<?php
namespace App\Http\Middleware;
use Closure;
class OturumKontrolu
{
public function handle($request, Closure $next)
{
if($request->session()->get('yoneticiSifre') && $request->session()->get('yoneticiMail')){
return redirect('/anakumanda');
}else{
return $next($request);
}
return redirect('/yonlendirmeHatasi');
}
}
返回重定向(&#39; / yonlendirmeHatasi&#39;);