Work in server (same code) but in localhost it return false always I have tried many ways.
I have tried Laravel build-in function login and so far the result always return false while debugging.
//Middleware RedirectIfAdmin
namespace App\Http\Middleware;
use Closure; use Illuminate\Support\Facades\Auth;
class RedirectIfAdmin { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null $guard * @return mixed */ public function handle($request, Closure $next, $guard = null) { $auth=Auth::guard('admin'); if (Auth::guard($guard)->check()) {
return redirect('admin/dashboard');
}
return $next($request);
}
}
I will add other code also if needed please tell me I am a new to ask question here. Please guide me.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2YzSAWk
via IFTTT
Aucun commentaire:
Enregistrer un commentaire