group(function () { Route::get('note/form/{element}', 'NoteAPIController@form'); Route::resource('note', 'NoteAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for notes Route::prefix('{guard}/note')->group(function () { Route::get('note/form/{element}', 'NoteAPIController@form'); Route::apiResource('note', 'NoteAPIController'); }); // Public routes for notes Route::get('note/Note', 'NotePublicController@getNote'); } ); }