group(function () { Route::get('bt_object/form/{element}', 'BtObjectAPIController@form'); Route::resource('bt_object', 'BtObjectAPIController'); }); // Public routes for bt_object Route::get('objects/', 'BtObjectPublicController@index'); Route::get('objects/{slug?}', 'BtObjectPublicController@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('bt_object/form/{element}', 'BtObjectAPIController@form'); Route::apiResource('bt_object', 'BtObjectAPIController'); }); // Public routes for objects Route::get('object/BtObject', 'BtObjectPublicController@getBtObject'); } ); }