vendredi 29 septembre 2017

Redirect issue in middleware for admin login in Laravel

When login to admin,then page is redirect But 'The page isn't redirecting properly' message show. Please help me

Middleware  - IsAdmin.php

    public function handle($request, Closure $next)
    {

         if (Auth::user()->role_id == 1)
        {
            return redirect ('/administrator');
        }

               return $next($request);
    }

web.php

Route::group(['prefix'=>'administrator','as' => 'admin.','middleware' => ['auth'],'middleware' => 'isAdmin'], function(){

    Route::get('/','AdminController@index');

    Route::resource('user','AdminController');

    Route::resource('card','AdminCardController');

});

Thanx in advanced..



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2xH53Me
via IFTTT

Aucun commentaire:

Enregistrer un commentaire