app->make('Shopping\Product\Interfaces\ProductRepositoryInterface'); return $productrepo->findorNew($product); }); } if (Request::is('*/product/category/*')) { Route::bind('category', function ($category) { $categoryrepo = $this->app->make('Shopping\Product\Interfaces\CategoryRepositoryInterface'); return $categoryrepo->findorNew($category); }); } if (Request::is('*/product/attribute/*')) { Route::bind('attribute', function ($attribute) { $attributerepo = $this->app->make('Shopping\Product\Interfaces\AttributeRepositoryInterface'); return $attributerepo->findorNew($attribute); }); } if (Request::is('*/product/attributegroup/*')) { Route::bind('attributegroup', function ($attributegroup) { $attributegrouprepo = $this->app->make('Shopping\Product\Interfaces\AttributegroupRepositoryInterface'); return $attributegrouprepo->findorNew($attributegroup); }); } } /** * 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'); }); } }