Skip to content

Get the same data that the screen is displayed #2761

Closed Answered by tabuna
winex01 asked this question in Q&A
Discussion options

You must be logged in to vote

Specify parameters for the method:

public function commandBar(): iterable
{
    return [
        Button::make('Export CSV')
            ->icon('cloud-download')
            ->method('export', request()->all())
            ->rawClick(),
    ];
}

public function export()
{
   $roles = Role::filters(RoleFiltersLayout::class)
        ->defaultSort('name', 'asc');
}

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@winex01
Comment options

@tabuna
Comment options

Answer selected by winex01
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants