group(function () { Route::get('objects/form/{element}', 'ObjectsAPIController@form'); Route::resource('objects', 'ObjectsAPIController'); }); // Public routes for objects Route::get('objects/', 'ObjectsPublicController@index'); Route::get('objects/{slug?}', 'ObjectsPublicController@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('objects/form/{element}', 'ObjectsAPIController@form'); Route::apiResource('objects', 'ObjectsAPIController'); }); // Public routes for objects Route::get('object/Objects', 'ObjectsPublicController@getObjects'); } ); }