app->make('Btravel\Infobjects\Interfaces\InfocategoryRepositoryInterface'); return $infocategoryrepo->findorNew($infocategory); }); } if (Request::is('*/infobjects/infobject/*')) { Route::bind('infobject', function ($infobject) { $infobjectrepo = $this->app->make('Btravel\Infobjects\Interfaces\InfobjectRepositoryInterface'); return $infobjectrepo->findorNew($infobject); }); } if (Request::is('*/infobjects/icon/*')) { Route::bind('icon', function ($icon) { $iconrepo = $this->app->make('Btravel\Infobjects\Interfaces\IconRepositoryInterface'); return $iconrepo->findorNew($icon); }); } } /** * 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'); }); } }