1

I have a table using Livewire Powergrid. It has the following columns:

  • id
  • name
  • email

I want to be able to click the data in the id column that loads and load a laravel route. I am able to create buttons that do this and load a laravel route.

This is how i load the buttons:

public function actions(): array
    {
       return [
           Button::make('edit', 'Edit')
               ->class('bg-indigo-500 cursor-pointer text-white px-3 py-2.5 m-1 rounded text-sm')
               ->route('refund.edit', ['refund' => 'id']),

           Button::make('destroy', 'Delete')
               ->class('bg-red-500 cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
               ->route('refund.destroy', ['refund' => 'id'])
               ->method('delete')
        ];
    }

All i need to do is exactly the same thing the buttons do, but just on the id's that load in the table instead. So a clickable table row.

MatHatrik
  • 762
  • 1
  • 6
  • 16

0 Answers0