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

23 lines
270 B
PHP
Raw Normal View History

2019-10-18 09:25:37 +00:00
<?php
namespace App\Http\Middleware;
use Closure , Session;
class SignMid
{
public function handle($request, Closure $next)
{
if (Session::has('user_id') ) {
return redirect('');
}else{
return $next($request);
}
}
}