nuovo2023
Replicating and successRedirectUrl
I found the solution, for future references purposes, it is something like this:
->successRedirectUrl(fn($replica) => route('filament.company.resources.business-hours.edit', [
'tenant' => $replica->company_id,
'record' => $replica->id
])),
3 replies
FileUpload
Don't tell me it can be solved with this:
protected function getActions(): array
{
return [
Actions\DeleteAction::make()
->after(function (YourModel $record) {
// delete single
if ($record->photo) {
Storage::disk('public')->delete($record->photo);
}
// delete multiple
if ($record->galery) {
foreach ($record->galery as $ph) Storage::disk('public')->delete($ph);
}
}),
];
}
7 replies