Why is my $record->save(); not working
Should I expect one of these to save the current record?
Or
The field changes on the scren but is not save.
Solution:Jump to solution
in your case if you want to update the model you need to do
```php
Action::make('Pause Campaign')
->action(function (?Model $record) {...
6 Replies
Because you don’t change the data of your record 🤔
$set
is a helper for the form data. Not for Laravel models.Solution
in your case if you want to update the model you need to do
I tried both of those and they don't save. Am I missing something else?
Try
Both of what? I explained why both of your examples don’t work and Tieme only shared one example which definitely should work?!
My bad, I re-read your first comment and Tieme first comment and realized that I mis-read. Both explaination where helpful and It is working as needed.