group(function () { Route::get('project/form/{element}', 'ProjectAPIController@form'); Route::resource('project', 'ProjectAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for marketing_projects Route::prefix('{guard}/marketing_project')->group(function () { Route::get('project/form/{element}', 'ProjectAPIController@form'); Route::apiResource('project', 'ProjectAPIController'); }); // Public routes for marketing_projects Route::get('marketing_project/Project', 'ProjectPublicController@getProject'); } ); }