Support the ongoing development of Laravel.io →
Requests Input
Last updated 2 years ago.
0

Do you add $fillable variable in your category model?

http://laravel.com/docs/5.0/eloquent#mass-assignment

Last updated 9 years ago.
0

barisbora said:

Do you add $fillable variable in your category model?

http://laravel.com/docs/5.0/eloquent#mass-assignment

i think u didnt read my issue

i dont have issue with mass assignment as it work in the second condition

and also it work when i need to store a new category

0

no need i just find a way

$category->update([ 'name'=> $request->get('name'), 'image' => $request->get('image') ]);

will solve it

i dono why

$category->update($request->all());

have an issue >_<

0

Sign in to participate in this thread!

Eventy

Your banner here too?

8lbiasian 8lbiasian Joined 6 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.