ok

Mini Shell

Direktori : /proc/thread-self/root/home2/selectio/www/innerstore/app/Http/Middleware/
Upload File :
Current File : //proc/thread-self/root/home2/selectio/www/innerstore/app/Http/Middleware/SellerMiddleware.php

<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Support\Facades\Auth;

class SellerMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param \Illuminate\Http\Request $request
     * @param \Closure $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if (auth('seller')->check() && auth('seller')->user()->status == 'approved') {
            return $next($request);
        }
        auth()->guard('seller')->logout();
        return redirect()->route('seller.auth.login');
    }
}

Zerion Mini Shell 1.0