I have a table called agents
and I want to check in middleware
when the agent is trying to log in, the agent is active or not
public function handle($request, Closure $next)
{
$user = $this->auth->user();
if(agentmodel::where('status') == 'active'){
true;
}else{
false;
}
}