File "RedirectIfAdminIsLoggedIIn.php"
Full Path: /home/fundopuh/trader.fxex.org/app/Http/Middleware/RedirectIfAdminIsLoggedIIn.php
File size: 580 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
// this Code is Cracked by dharunMods-YouTube-Channel
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class RedirectIfAdminIsLoggedIIn
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)
{
if (Auth::guard('admin')->check()) {
return redirect('/admin/dashboard');
}
return $next($request);
}
}