How to redirect from one record to another record with the passing the value()

->actions([ Tables\Actions\EditAction::make(), Action::make('employee_details')->label('Employee Details') ->url(fn (Work $record) => EmployeeWorkResource::getUrl('index', ['record' => $record])), ]) kindly advise me to how to redirect
11 Replies
LeandroFerreira
it is ok, what is the issue?
Hemanath
HemanathOP2y ago
i am trying to get the record using mount() function ....but showing error ('App\Filament\Resources\EmployeeWorkResource\Pages\ListEmployeeWorks::mount()' is not compatible with method 'Filament\Resources\Pages\ListRecords::mount()')...
LeandroFerreira
are you trying to override the mount method of the ListPage?
Hemanath
HemanathOP2y ago
yes
LeandroFerreira
can you share the code? did you copy the mount method from the ListRecords.php?
LeandroFerreira
curious to know if you are the same person
Hemanath
HemanathOP2y ago
public function mount(Request $request) { abort_unless(Work::query()->where('id', '=', $request->get('record'))->exists(), 404); $this->record = Work::query()->find($request->get('record')); }
LeandroFerreira
public function mount(): void
Hemanath
HemanathOP2y ago
okay let try.. How should use $request inside above function() no but collegue
LeandroFerreira
Laravel
Components | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Hemanath
HemanathOP2y ago
okay wll see and try

Did you find this page helpful?