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