app->make('Inventory\Invent\Interfaces\CurrencyRepositoryInterface'); return $currencyrepo->findorNew($currency); }); } if (Request::is('*/invent/location/*')) { Route::bind('location', function ($location) { $locationrepo = $this->app->make('Inventory\Invent\Interfaces\LocationRepositoryInterface'); return $locationrepo->findorNew($location); }); } if (Request::is('*/invent/tax/*')) { Route::bind('tax', function ($tax) { $taxrepo = $this->app->make('Inventory\Invent\Interfaces\TaxRepositoryInterface'); return $taxrepo->findorNew($tax); }); } } /** * 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'); }); } }