app->make('Litecms\Homepage\Interfaces\CarouselRepositoryInterface'); return $carouselRepo->findorNew($carousel); }); } if (Request::is('*/homepage/catalog/*')) { Route::bind('catalog', function ($catalog) { $catalogRepo = $this->app->make('Litecms\Homepage\Interfaces\CatalogRepositoryInterface'); return $catalogRepo->findorNew($catalog); }); } if (Request::is('*/homepage/news_and_press/*')) { Route::bind('news_and_press', function ($news_and_press) { $news_and_pressRepo = $this->app->make('Litecms\Homepage\Interfaces\NewsAndPressRepositoryInterface'); return $news_and_pressRepo->findorNew($news_and_press); }); } if (Request::is('*/homepage/promo/*')) { Route::bind('promo', function ($promo) { $promoRepo = $this->app->make('Litecms\Homepage\Interfaces\PromoRepositoryInterface'); return $promoRepo->findorNew($promo); }); } } /** * Define the routes for the package. * * @return void */ public function map() { $this->mapWebRoutes(); $this->mapApiRoutes(); } /** * 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'); }); } /** * Define the "api" routes for the package. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { Route::group([ 'middleware' => 'api', 'namespace' => $this->namespace, 'prefix' => 'api', ], function ($router) { require (__DIR__ . '/../../routes/api.php'); }); } }