group(function () { Route::resource('category', 'CategoryResourceController'); }); // Guard routes for category Route::prefix('{guard}/category')->group(function () { Route::resource('category', 'CategoryResourceController'); }); // Public routes for category Route::get('categories/', 'CategoryPublicController@index'); Route::get('category/{slug?}', 'CategoryPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for category Route::prefix('{guard}/category')->group(function () { Route::resource('category', 'CategoryResourceController'); }); // Guard routes for category Route::prefix('{guard}/category')->group(function () { Route::resource('category', 'CategoryResourceController'); }); // Public routes for category Route::get('categories/', 'CategoryPublicController@index'); Route::get('category/{slug?}', 'CategoryPublicController@show'); } ); }