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:
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.
Solution:Jump to solution
Hello, thanks for your reply. I changed direction on this so the rotas are handled differently now, I did run into a similar issue with another one of my models and ended up using the before method on the replicate action:
```php
->before(function (Grades $record) {
$record->name = $record->name . ' (Copy)';...
2 Replies
Hey, im having the same issue, did you resolve this by any chance?
I found a way around this by using:
Hope this helps!
Solution
Hello, thanks for your reply. I changed direction on this so the rotas are handled differently now, I did run into a similar issue with another one of my models and ended up using the before method on the replicate action: