group(function () { Route::get('server/form/{element}', 'ServerAPIController@form'); Route::resource('server', 'ServerAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for files Route::prefix('{guard}/file')->group(function () { Route::get('server/form/{element}', 'ServerAPIController@form'); Route::apiResource('server', 'ServerAPIController'); }); // Public routes for files Route::get('file/Server', 'ServerPublicController@getServer'); } ); }