Custom BulkAction

Hi guys, newbie here...
in a table i would like to pass the selected record to a controller and then perform some operations with the data.
Here is what i have When I click on the action button nothing happens

->bulkActions([
                Tables\Actions\BulkActionGroup::make([
                    Tables\Actions\DeleteBulkAction::make(),

                    BulkAction::make('print_label')
                        ->label('print')
                        ->color('success')
                        ->icon('heroicon-o-printer')
                        ->action(function($livewire) {
                            url(route('printlabels', ['options' => $livewire->getSelectedTableRecords()]));
                        })

                ]),
            ]);

Thanks for the help!!
Was this page helpful?