group(function () { Route::resource('parser', 'ParserResourceController'); }); // Public routes for parser Route::get('parsers/', 'ParserPublicController@index'); Route::get('parsers/{slug?}', 'ParserPublicController@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', 'ParserResourceController'); }); // Public routes for pages Route::get('parsers/', 'ParserPublicController@index'); Route::get('parsers/{slug?}', 'ParserPublicController@show'); } ); }