Skip to content
Discussion options

You must be logged in to vote

Here is an example. The docs are not very helpful.
In my show I have -

Widget::add()
            ->to('after_content')
            ->type('view')
            ->view('vendor.backpack.crud.widgets.user_campaigns')
            ->data($campaigns); // <==== This is the data I want to pass.

and I have this the blade file -

@forelse ($widget['data'] as $campaign) <==== use $widget with a key value of 'data'
                <tr>
                    <td>{{ $campaign->name }}</td>
                    <td>{{ $campaign->pivot->role }}</td>
                </tr>
            @empty
                <tr>
                    <td colspan="2" class="text-center">No campaigns found.</td>
                </t…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tabacitu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants