jeudi 8 décembre 2016

Call to a member function save() on integer

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)->auth_teacher = 1;
           $c->update();
        }
    }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire