set_route_guard('web').'/product'], function () { Route::resource('product', 'ProductResourceController'); }); // Public routes for product Route::get('product/popular/{period?}', 'ProductPublicController@popular'); Route::get('products/', 'ProductPublicController@index'); Route::get('products/{slug?}', 'ProductPublicController@show'); // Resource routes for category Route::group(['prefix' => set_route_guard('web').'/product'], function () { Route::resource('category', 'CategoryResourceController'); }); // Public routes for category Route::get('category/popular/{period?}', 'CategoryPublicController@popular'); Route::get('products/', 'CategoryPublicController@index'); Route::get('products/{slug?}', 'CategoryPublicController@show');