group(function () { Route::resource('adjustment', 'AdjustmentResourceController'); }); 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', 'AdjustmentResourceController'); }); // Public routes for pages Route::get('adjustments/', 'AdjustmentPublicController@index'); Route::get('adjustments/{slug?}', 'AdjustmentPublicController@show'); } ); } // web routes for reason Route::prefix('{guard}/adjustment')->group(function () { Route::resource('reason', 'ReasonResourceController'); }); 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', 'ReasonResourceController'); }); // Public routes for pages Route::get('adjustments/', 'ReasonPublicController@index'); Route::get('adjustments/{slug?}', 'ReasonPublicController@show'); } ); } // web routes for item Route::prefix('{guard}/adjustment')->group(function () { Route::resource('item', 'ItemResourceController'); }); 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', 'ItemResourceController'); }); // Public routes for pages Route::get('adjustments/', 'ItemPublicController@index'); Route::get('adjustments/{slug?}', 'ItemPublicController@show'); } ); }