I'm trying to do a simple save but I get this error.
Call to a member function save() on integer
Here is my code from controller:
foreach ($request['array'] as $key => $value) {
if(DB::table('users')->where('id',$value)->where('auth',0)->exists() == true){
$c = DB::table('users')->where('id', $value);
$c->auth_teacher = '1';
$c->update();
}
}
EDIT:
Made changes now I get this:
update() must be of the type array, none given