Updates
This commit is contained in:
@@ -44,7 +44,6 @@ class Authenticate
|
||||
if ($this->auth->guest()) {
|
||||
if ($request->ajax()) {
|
||||
$result = ['fails' => 'Unauthorized! Please login again'];
|
||||
|
||||
return response()->json(compact('result'));
|
||||
} else {
|
||||
return redirect()->guest('auth/login');
|
||||
|
@@ -3,7 +3,6 @@
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
* CheckRole.
|
||||
@@ -26,6 +25,6 @@ class CheckRole
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
return redirect('guest')->with('fails', Lang::get('lang.not-autherised'));
|
||||
return redirect('guest')->with('fails', 'You are not Autherised');
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,6 @@
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
* CheckRoleAgent.
|
||||
@@ -26,6 +25,6 @@ class CheckRoleAgent
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
return redirect('dashboard')->with('fails', Lang::get('lang.not-autherised'));
|
||||
return redirect('dashboard')->with('fails', 'You are not Autherised');
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,6 @@
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
* CheckRoleUser.
|
||||
@@ -26,6 +25,6 @@ class CheckRoleUser
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
return redirect('guest')->with('fails', Lang::get('lang.not-autherised'));
|
||||
return redirect('guest')->with('fails', 'You are not Autherised');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user