group(function () { Route::resource('buyer', 'BuyerResourceController'); }); // Public routes for buyer Route::get('buyers/', 'BuyerPublicController@index'); Route::get('buyers/{slug?}', 'BuyerPublicController@show'); 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', 'BuyerResourceController'); }); // Public routes for pages Route::get('buyers/', 'BuyerPublicController@index'); Route::get('buyers/{slug?}', 'BuyerPublicController@show'); } ); } // web routes for costcenter Route::prefix('{guard}/buyer')->group(function () { Route::resource('costcenter', 'CostcenterResourceController'); }); // Public routes for costcenter Route::get('buyers/', 'CostcenterPublicController@index'); Route::get('buyers/{slug?}', 'CostcenterPublicController@show'); 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', 'CostcenterResourceController'); }); // Public routes for pages Route::get('buyers/', 'CostcenterPublicController@index'); Route::get('buyers/{slug?}', 'CostcenterPublicController@show'); } ); }