group(function () { Route::get('card/form/{element}', 'CardAPIController@form'); Route::resource('card', 'CardAPIController'); }); // 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 cards Route::prefix('{guard}/card')->group(function () { Route::get('card/form/{element}', 'CardAPIController@form'); Route::apiResource('card', 'CardAPIController'); }); // Public routes for cards Route::get('card/Card', 'CardPublicController@getCard'); } ); } // API routes for offer Route::prefix('{guard}/card')->group(function () { Route::get('offer/form/{element}', 'OfferAPIController@form'); Route::resource('offer', 'OfferAPIController'); }); // 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 cards Route::prefix('{guard}/card')->group(function () { Route::get('offer/form/{element}', 'OfferAPIController@form'); Route::apiResource('offer', 'OfferAPIController'); }); // Public routes for cards Route::get('card/Offer', 'OfferPublicController@getOffer'); } ); } // API routes for bt_card_card Route::prefix('{guard}/card')->group(function () { Route::get('bt_card_card/form/{element}', 'BtCardCardAPIController@form'); Route::resource('bt_card_card', 'BtCardCardAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for cards Route::prefix('{guard}/card')->group(function () { Route::get('bt_card_card/form/{element}', 'BtCardCardAPIController@form'); Route::apiResource('bt_card_card', 'BtCardCardAPIController'); }); // Public routes for cards Route::get('card/BtCardCard', 'BtCardCardPublicController@getBtCardCard'); } ); } // API routes for brand Route::prefix('{guard}/card')->group(function () { Route::get('brand/form/{element}', 'BrandAPIController@form'); Route::resource('brand', 'BrandAPIController'); }); // 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 cards Route::prefix('{guard}/card')->group(function () { Route::get('brand/form/{element}', 'BrandAPIController@form'); Route::apiResource('brand', 'BrandAPIController'); }); // Public routes for cards Route::get('card/Brand', 'BrandPublicController@getBrand'); } ); }