app->make('Litepie\Product\Interfaces\ProductRepositoryInterface'); return $productrepo->findorNew($product); }); } if (Request::is('*/product/brand/*')) { Route::bind('brand', function ($brand) { $brandrepo = $this->app->make('Litepie\Product\Interfaces\BrandRepositoryInterface'); return $brandrepo->findorNew($brand); }); } if (Request::is('*/product/category/*')) { Route::bind('category', function ($category) { $categoryrepo = $this->app->make('Litepie\Product\Interfaces\CategoryRepositoryInterface'); return $categoryrepo->findorNew($category); }); } if (Request::is('*/product/productmodel/*')) { Route::bind('productmodel', function ($productmodel) { $productmodelrepo = $this->app->make('Litepie\Product\Interfaces\ProductmodelRepositoryInterface'); return $productmodelrepo->findorNew($productmodel); }); } } /** * 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'); }); } }