I created a global anonimus scope in the user model, as shown below, to get only public users in the interface:
protected static function boot()
{
parent::boot();
static::addGlobalScope('is_public', function(Builder $builder) {
$builder->where('is_public', '=', 1);
});
}
But ... when I need to login to the backend, of course, I need to check non-public users, so I need to exclude the global scope.
Is this possible using the default AuthController for laravel?
Many thanks!
source
share