group(function () { Route::get('adjustment/form/{element}', 'AdjustmentAPIController@form'); Route::resource('adjustment', 'AdjustmentAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for adjustments Route::prefix('{guard}/adjustment')->group(function () { Route::get('adjustment/form/{element}', 'AdjustmentAPIController@form'); Route::apiResource('adjustment', 'AdjustmentAPIController'); }); // Public routes for adjustments Route::get('adjustment/Adjustment', 'AdjustmentPublicController@getAdjustment'); } ); } // API routes for reason Route::prefix('{guard}/adjustment')->group(function () { Route::get('reason/form/{element}', 'ReasonAPIController@form'); Route::resource('reason', 'ReasonAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for adjustments Route::prefix('{guard}/adjustment')->group(function () { Route::get('reason/form/{element}', 'ReasonAPIController@form'); Route::apiResource('reason', 'ReasonAPIController'); }); // Public routes for adjustments Route::get('adjustment/Reason', 'ReasonPublicController@getReason'); } ); } // API routes for item Route::prefix('{guard}/adjustment')->group(function () { Route::get('item/form/{element}', 'ItemAPIController@form'); Route::resource('item', 'ItemAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for adjustments Route::prefix('{guard}/adjustment')->group(function () { Route::get('item/form/{element}', 'ItemAPIController@form'); Route::apiResource('item', 'ItemAPIController'); }); // Public routes for adjustments Route::get('adjustment/Item', 'ItemPublicController@getItem'); } ); }