I'm working in laravel 5, I have a module where the user can update the information of students, for that The user has a preloaded form with the current data and he can modify the fields that he wants.Then, in the controller I do:
$perfil->update(Input::all())
That works pretty good. So my question is: there's a way of get the name of the fields that have been updated?
You want to use the dirty() method. this has been explained well here.
You can use getChanges()
on Eloquent model even after persisting.
$offer->update($data);
$offer->getChanges(); // [ "price_min" => "1233", "updated_at" => "2019-01-10 15:36:23"]