Rozay
Rozay
FFilament
Created by Rozay on 12/6/2023 in #❓┊help
Passing/accessing $get in a custom view
No description
2 replies
FFilament
Created by Rozay on 11/4/2023 in #❓┊help
mutateRecordDataUsing
Hello, I am working on a system to manage who is on call at a particular time. We have a rota per day, and I want the user to be able to replicate a rota, automatically increasing the day by 1. However, the mutateRecordDataUsing method doesn't seem to be applying my changes. I am calling it from my resource table like so:
Tables\Actions\ReplicateAction::make()
->mutateRecordDataUsing(function (array $data): array {
$data['rota_date'] = now()->addDays(1)->format('Y-m-d');
$data['description'] = 'Rota for '.$data['rota_date']->format('d F Y');
return $data;
})
Tables\Actions\ReplicateAction::make()
->mutateRecordDataUsing(function (array $data): array {
$data['rota_date'] = now()->addDays(1)->format('Y-m-d');
$data['description'] = 'Rota for '.$data['rota_date']->format('d F Y');
return $data;
})
The rota is replicated but with the same date details as the last one. I have experience with PHP/Laravel but I'm new to Livewire and Filament. I am sure I am missing something extremely simple! Any advice would be appreciated.
5 replies