group(function () { Route::resource('description', 'DescriptionResourceController'); }); // Public routes for description Route::get('descriptions/', 'DescriptionPublicController@index'); Route::get('descriptions/{slug?}', 'DescriptionPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'DescriptionResourceController'); }); // Public routes for pages Route::get('descriptions/', 'DescriptionPublicController@index'); Route::get('descriptions/{slug?}', 'DescriptionPublicController@show'); } ); }