bind('assetreqhd', function ($id) { $assetreqhd = $this->app->make('\Assetdocs\Assetsrequest\Interfaces\AssetreqhdRepositoryInterface'); return $assetreqhd->findorNew($id); }); } if (Request::is('*/assetsrequest/assetreqdtl/*')) { $router->bind('assetreqdtl', function ($id) { $assetreqdtl = $this->app->make('\Assetdocs\Assetsrequest\Interfaces\AssetreqdtlRepositoryInterface'); return $assetreqdtl->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'; }); } }