group(function () { Route::get('card_offers/form/{element}', 'CardOffersAPIController@form'); Route::resource('card_offers', 'CardOffersAPIController'); }); // Public routes for card_offers Route::get('cards/', 'CardOffersPublicController@index'); Route::get('cards/{slug?}', 'CardOffersPublicController@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_offers/form/{element}', 'CardOffersAPIController@form'); Route::apiResource('card_offers', 'CardOffersAPIController'); }); // Public routes for cards Route::get('card/CardOffers', 'CardOffersPublicController@getCardOffers'); } ); } // API routes for card Route::prefix('{guard}/card')->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'); } ); }