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
LeandroFerreira12mo ago
it is ok, what is the issue?
Hemanath
Hemanath12mo 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
LeandroFerreira12mo ago
are you trying to override the mount method of the ListPage?
Hemanath
Hemanath12mo ago
yes
LeandroFerreira
LeandroFerreira12mo ago
can you share the code? did you copy the mount method from the ListRecords.php?
LeandroFerreira
LeandroFerreira12mo ago
curious to know if you are the same person
Hemanath
Hemanath12mo 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
LeandroFerreira12mo ago
public function mount(): void
Hemanath
Hemanath12mo ago
okay let try.. How should use $request inside above function() no but collegue
LeandroFerreira
LeandroFerreira12mo ago
Laravel
Components | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Hemanath
Hemanath12mo ago
okay wll see and try