group(function () { Route::get('scheduler/form/{element}', 'SchedulerAPIController@form'); Route::resource('scheduler', 'SchedulerAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for schedulers Route::prefix('{guard}/scheduler')->group(function () { Route::get('scheduler/form/{element}', 'SchedulerAPIController@form'); Route::apiResource('scheduler', 'SchedulerAPIController'); }); // Public routes for schedulers Route::get('scheduler/Scheduler', 'SchedulerPublicController@getScheduler'); } ); }