app->make('Litepie\News\Interfaces\NewsRepositoryInterface'); return $newsrepo->findorNew($news); }); } if (Request::is('*/news/news_category/*')) { Route::bind('news_category', function ($news_category) { $news_categoryrepo = $this->app->make('Litepie\News\Interfaces\NewsCategoryRepositoryInterface'); return $news_categoryrepo->findorNew($news_category); }); } } /** * 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'); }); } }