bind('block', function ($id) { $block = $this->app->make('\Litecms\Blocks\Interfaces\BlockRepositoryInterface'); return $block->findorNew($id); }); } if (Request::is('*/blocks/category/*')) { $router->bind('category', function ($id) { $category = $this->app->make('\Litecms\Blocks\Interfaces\CategoryRepositoryInterface'); return $category->findorNew($id); }); } } /** * Define the routes for the application. * * @param \Illuminate\Routing\Router $router * * @return void */ public function map(Router $router) { $router->group(['namespace' => $this->namespace], function ($router) { require __DIR__ . '/../Http/routes.php'; }); } }