public function handle($request, Closure $next)
{
if ($this->guard->guest()) {
if ($request->ajax() || $request->wantsJson()) {
return response('Unauthorized.', 401);
} else {
return redirect()->guest(URL::route('auth'));
}
}
}
public function on($first, $operator, $second, $boolean = 'and', $where = false) {}
DB::table('user')->leftJoin('payments', function($join) {
$join->on('entity_type', '=', 'salary', 'and', true)
->on('entity_id', '=', 'user.id')
})->get()