How to extend User class with scope. I want to extend class user with scope "hasLocation":
For example:
User::hasLocation()->get();
public hasLocation($query){
return $query->where('has_location',1);
}
I want create hasLocation scope
Last updated