Qlic
4 years ago

Mass Assignment update gives no feedback

Posted 4 years ago by Qlic

Hello,

I am attempting to update a table using an eloquent model. However, it gives me no feedback, i tried several things but i can;t figure out whats wrong here.

Student::findOrFail(Auth::user()->student->id)->update($request->all());
dd('sadsada');
 //Auth::user()->student->update($request->all());

If i place a diedump before the update command, it gets shown, if i place it below the update nothing, the page just refreshes. I tried two methods, both have the same behaviour. Also i did a diedump on Auth::user()->student, that returns a collection as it should.

In the Student model, i have defined the $fillable array.

Now i'm not sure wether the method is allowed for an update, or if its create only. I wanted to try this to prevent me having to define all update fields manually.

Please sign in or create an account to participate in this conversation.