app->make('Btravel\Card\Interfaces\CardRepositoryInterface'); return $cardrepo->findorNew($card); }); } if (Request::is('*/card/offer/*')) { Route::bind('offer', function ($offer) { $offerrepo = $this->app->make('Btravel\Card\Interfaces\OfferRepositoryInterface'); return $offerrepo->findorNew($offer); }); } if (Request::is('*/card/bt_card_card/*')) { Route::bind('bt_card_card', function ($bt_card_card) { $bt_card_cardrepo = $this->app->make('Btravel\Card\Interfaces\BtCardCardRepositoryInterface'); return $bt_card_cardrepo->findorNew($bt_card_card); }); } if (Request::is('*/card/brand/*')) { Route::bind('brand', function ($brand) { $brandrepo = $this->app->make('Btravel\Card\Interfaces\BrandRepositoryInterface'); return $brandrepo->findorNew($brand); }); } } /** * Define the routes for the package. * * @return void */ public function map() { $this->mapWebRoutes(); } /** * Define the "web" routes for the package. * * These routes all receive session state, CSRF protection, etc. * * @return void */ protected function mapWebRoutes() { Route::group([ 'middleware' => 'web', 'namespace' => $this->namespace, ], function ($router) { require (__DIR__ . '/../../routes/web.php'); }); } }