Path : /var/www/html/thb_loan_system/app/Http/Middleware/ |
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
Current File : /var/www/html/thb_loan_system/app/Http/Middleware/SentinelAuth.php |
<?php namespace App\Http\Middleware; use Closure; use Sentinel; class SentinelAuth { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if (!Sentinel::check()) { if ($request->ajax()) { return response('Unauthorized.', 401); } else { return redirect()->guest('/'); } } return $next($request); } }