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
it is ok, what is the issue?
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()')...
are you trying to override the mount method of the ListPage?
yes
can you share the code?
did you copy the mount method from the ListRecords.php?
curious to know if you are the same person
public function mount(Request $request)
{
abort_unless(Work::query()->where('id', '=', $request->get('record'))->exists(), 404);
$this->record = Work::query()->find($request->get('record'));
}
public function mount(): void
okay let try..
How should use $request inside above function()
no but collegue
Laravel
Components | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
okay wll see and try