group(function () { Route::get('externaldata/form/{element}', 'ExternaldataAPIController@form'); Route::resource('externaldata', 'ExternaldataAPIController'); }); // Public routes for externaldata Route::get('externaldatas/', 'ExternaldataPublicController@index'); Route::get('externaldatas/{slug?}', 'ExternaldataPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for externaldatas Route::prefix('{guard}/externaldatum')->group(function () { Route::get('externaldata/form/{element}', 'ExternaldataAPIController@form'); Route::apiResource('externaldata', 'ExternaldataAPIController'); }); // Public routes for externaldatas Route::get('externaldatum/Externaldata', 'ExternaldataPublicController@getExternaldata'); } ); }