group(function () { Route::resource('card_offers', 'CardOffersResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'CardOffersResourceController'); }); // Public routes for pages Route::get('cards/', 'CardOffersPublicController@index'); Route::get('cards/{slug?}', 'CardOffersPublicController@show'); } ); } // web routes for card Route::prefix('{guard}/card')->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'); } ); }