group(function () { Route::get('parser/form/{element}', 'ParserAPIController@form'); Route::resource('parser', 'ParserAPIController'); }); // 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 parsers Route::prefix('{guard}/parser')->group(function () { Route::get('parser/form/{element}', 'ParserAPIController@form'); Route::apiResource('parser', 'ParserAPIController'); }); // Public routes for parsers Route::get('parser/Parser', 'ParserPublicController@getParser'); } ); }