php - Laravel 5 routes of Modules can't working correct when use authentication middleware -


i'm create folder modules in folder app.
i'm config complete.

module.php

return  [     'modules' => [         'product',     ] ]; 

routes.php

route::group(['middleware' => 'auth', 'prefix' => 'products', 'namespace' => 'app\modules\product\controllers'], function() { //  route::get('/categories', ['as' => 'categories.index', 'uses' => 'categorycontroller@index']);     route::get('/', ['as' => 'products.index', 'uses' => 'productcontroller@index']); }); 

produccontroller.php

namespace app\modules\product\controllers;  use illuminate\http\request;  use app\http\requests; use app\http\controllers\controller;  class productcontroller extends controller {     /**      * display listing of resource.      *      * @return \illuminate\http\response      */     public function index()     {         return view('product::product');     } } 

but when go http://xxxxxxx.dev/products page redirect welcome page.
if remove 'middleware' => 'auth' routes.php working correct.

please me!


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -