19 lines
290 B
PHP
19 lines
290 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Middleware;
|
||
|
|
||
|
use Closure;
|
||
|
use Session;
|
||
|
class CmsAdmin
|
||
|
{
|
||
|
|
||
|
public function handle($request, Closure $next)
|
||
|
{
|
||
|
if (!Session::has('is_admin')) {
|
||
|
return redirect('user/login');
|
||
|
}else{
|
||
|
return $next($request);
|
||
|
}
|
||
|
}
|
||
|
}
|