group(function () { Route::resource('supplier', 'SupplierResourceController'); }); // Public routes for supplier Route::get('suppliers/', 'SupplierPublicController@index'); Route::get('suppliers/{slug?}', 'SupplierPublicController@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', 'SupplierResourceController'); }); // Public routes for pages Route::get('suppliers/', 'SupplierPublicController@index'); Route::get('suppliers/{slug?}', 'SupplierPublicController@show'); } ); } // web routes for contract Route::prefix('{guard}/supplier')->group(function () { Route::resource('contract', 'ContractResourceController'); }); // Public routes for contract Route::get('suppliers/', 'ContractPublicController@index'); Route::get('suppliers/{slug?}', 'ContractPublicController@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', 'ContractResourceController'); }); // Public routes for pages Route::get('suppliers/', 'ContractPublicController@index'); Route::get('suppliers/{slug?}', 'ContractPublicController@show'); } ); }