group(function () { Route::resource('card', 'CardResourceController'); }); // Public routes for card Route::get('cards/', 'CardPublicController@index'); Route::get('cards/{slug?}', 'CardPublicController@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', 'CardResourceController'); }); // Public routes for pages Route::get('cards/', 'CardPublicController@index'); Route::get('cards/{slug?}', 'CardPublicController@show'); } ); } // web routes for offer Route::prefix('{guard}/card')->group(function () { Route::resource('offer', 'OfferResourceController'); }); // Public routes for offer Route::get('cards/', 'OfferPublicController@index'); Route::get('cards/{slug?}', 'OfferPublicController@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', 'OfferResourceController'); }); // Public routes for pages Route::get('cards/', 'OfferPublicController@index'); Route::get('cards/{slug?}', 'OfferPublicController@show'); } ); } // web routes for bt_card_card Route::prefix('{guard}/card')->group(function () { Route::resource('bt_card_card', 'BtCardCardResourceController'); }); 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', 'BtCardCardResourceController'); }); // Public routes for pages Route::get('cards/', 'BtCardCardPublicController@index'); Route::get('cards/{slug?}', 'BtCardCardPublicController@show'); } ); } // web routes for brand Route::prefix('{guard}/card')->group(function () { Route::resource('brand', 'BrandResourceController'); }); // Public routes for brand Route::get('cards/', 'BrandPublicController@index'); Route::get('cards/{slug?}', 'BrandPublicController@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', 'BrandResourceController'); }); // Public routes for pages Route::get('cards/', 'BrandPublicController@index'); Route::get('cards/{slug?}', 'BrandPublicController@show'); } ); }