C
C
chelkaz2016-03-10 19:05:35
Laravel
chelkaz, 2016-03-10 19:05:35

Laravel Doesn't update all fields. What's the catch?

Why doesn't it update all fields?
Auth::user()->update([
'name' => $request->input('user_name'),
'email'=> $request->input('email'),
'test'=> 555,
'photo'=> 'for example url',
]);
Fields test and photo varchar 250.
Name and soap change. But test and photo are not. And no errors...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrzej Wielski, 2016-03-10
@chelkaz

In the model, write them to the fillable variable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question