简体   繁体   中英

Call to a member function where() on integer

I get this error:

Call to a member function where() on integer

when I run this code:

DB::table('level_one_models')
  ->increment('followers', 1)
  ->where('active', '=', 1);

What am I doing wrong?

Call where before increment :

DB::table('level_one_models')
  ->where('active', 1)
  ->increment('followers', 1);
$org = organization_model::where('status',1)
->count('I'd);
return view('home')
->with('org',$org);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM