group(function () { Route::resource('adjustments', 'AdjustmentsResourceController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'AdjustmentsResourceController'); }); // Public routes for pages Route::get('salaries/', 'AdjustmentsPublicController@index'); Route::get('salaries/{slug?}', 'AdjustmentsPublicController@show'); } ); } // web routes for payrolls Route::prefix('{guard}/salary')->group(function () { Route::resource('payrolls', 'PayrollsResourceController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'PayrollsResourceController'); }); // Public routes for pages Route::get('salaries/', 'PayrollsPublicController@index'); Route::get('salaries/{slug?}', 'PayrollsPublicController@show'); } ); }