bind('cliente', function ($id) { $cliente = $this->app->make('\Clientes\Cliente\Interfaces\ClienteRepositoryInterface'); return $cliente->findorNew($id); }); } if (Request::is('*/cliente/cliente/*')) { $router->bind('cliente', function ($id) { $cliente = $this->app->make('\Clientes\Cliente\Interfaces\ClienteRepositoryInterface'); return $cliente->findorNew($id); }); } if (Request::is('*/cliente/arquivo/*')) { $router->bind('arquivo', function ($id) { $arquivo = $this->app->make('\Clientes\Cliente\Interfaces\ArquivoRepositoryInterface'); return $arquivo->findorNew($id); }); } if (Request::is('*/cliente/pasta/*')) { $router->bind('pasta', function ($id) { $pasta = $this->app->make('\Clientes\Cliente\Interfaces\PastaRepositoryInterface'); return $pasta->findorNew($id); }); } if (Request::is('*/cliente/endereco/*')) { $router->bind('endereco', function ($id) { $endereco = $this->app->make('\Clientes\Cliente\Interfaces\EnderecoRepositoryInterface'); return $endereco->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'; }); } }