Eshop-Laravel/app/Http/Middleware/SignMid.php
2019-10-18 12:25:37 +03:00

22 lines
270 B
PHP

<?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);
}
}
}