@kudtihaex They are probably empty because Laravel Nova does some magic with the models.
Action in Nova does not update original and changes fields
I have a resource called Ip Address and an action for checking the PTR records. The PTR value is stored in the database after the action is performed.
On IpAddress model I've added the Actionable trait to have a nice log of actions performed.
Here is how action looks like:
public function handle(ActionFields $fields, Collection $models)
{
foreach ($models as $model) {
$model->ptr = Ptr::check($model->address);
$model->save();
}
return Action::message('It worked!');
}
The action works and the log of each execution exists, however the fields original and changes are not populated at all even though with each action execution the value of ptr is changed.
I do not have any fields defined in this action, nor I need them because the value is supposed to be generated from a DNS query.
So the question is - why are original and changes empty?
Please or to participate in this conversation.