Eshop-Laravel/app/Http/Middleware/CmsAdmin.php

19 lines
290 B
PHP
Raw Permalink Normal View History

2019-10-18 09:25:37 +00:00
<?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);
}
}
}