group(function () { Route::get('adjustments/form/{element}', 'AdjustmentsAPIController@form'); Route::resource('adjustments', 'AdjustmentsAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for salaries Route::prefix('{guard}/salary')->group(function () { Route::get('adjustments/form/{element}', 'AdjustmentsAPIController@form'); Route::apiResource('adjustments', 'AdjustmentsAPIController'); }); // Public routes for salaries Route::get('salary/Adjustments', 'AdjustmentsPublicController@getAdjustments'); } ); } // API routes for payrolls Route::prefix('{guard}/salary')->group(function () { Route::get('payrolls/form/{element}', 'PayrollsAPIController@form'); Route::resource('payrolls', 'PayrollsAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for salaries Route::prefix('{guard}/salary')->group(function () { Route::get('payrolls/form/{element}', 'PayrollsAPIController@form'); Route::apiResource('payrolls', 'PayrollsAPIController'); }); // Public routes for salaries Route::get('salary/Payrolls', 'PayrollsPublicController@getPayrolls'); } ); }