DB::table('users')
->where('votes', 1)
->update(array('votes' => 10));
Using eloquent:
User::where('votes', 1)->update(array('votes' => 10));
I guess the field should be in the fillable array of your model
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.