jeudi 31 mars 2016

When using auth middleware, its redirecting me to home page

I am new in laravel app development. When I am using auth middleware, then it works fine for unregistered user(redirecting to login page). But when logged user going to visit that page, then its redirecting to home page (root directory).

below the route from routes.php code is

Route::group(['middleware' => 'auth'], function () {
    Route::resource('/edit', 'userController@edit');
});

Below my userController.php code is

<?php
 namespace App\Http\Controllers;
 use Illuminate\Http\Request;
 use App\Http\Requests;
 use App\allUsers;
 class userController extends Controller
 {
     public function index(){
     }

     public function show($id){
     }

     public function edit(){
         return view('auth.user_edit');
     }
  }

Anyone help me please.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire