group(function () { Route::get('object/form/{element}', 'ObjectAPIController@form'); Route::resource('object', 'ObjectAPIController'); }); // Public routes for object Route::get('objects/', 'ObjectPublicController@index'); Route::get('objects/{slug?}', 'ObjectPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for objects Route::prefix('{guard}/object')->group(function () { Route::get('object/form/{element}', 'ObjectAPIController@form'); Route::apiResource('object', 'ObjectAPIController'); }); // Public routes for objects Route::get('object/Object', 'ObjectPublicController@getObject'); } ); }