app->make('Bixo\Location\Interfaces\CountryRepositoryInterface'); return $countryrepo->findorNew($country); }); } if (Request::is('*/location/city/*')) { Route::bind('city', function ($city) { $cityrepo = $this->app->make('Bixo\Location\Interfaces\CityRepositoryInterface'); return $cityrepo->findorNew($city); }); } if (Request::is('*/location/location/*')) { Route::bind('location', function ($location) { $locationrepo = $this->app->make('Bixo\Location\Interfaces\LocationRepositoryInterface'); return $locationrepo->findorNew($location); }); } if (Request::is('*/location/properties/*')) { Route::bind('properties', function ($properties) { $propertiesrepo = $this->app->make('Bixo\Location\Interfaces\PropertiesRepositoryInterface'); return $propertiesrepo->findorNew($properties); }); } if (Request::is('*/location/sublocation/*')) { Route::bind('sublocation', function ($sublocation) { $sublocationrepo = $this->app->make('Bixo\Location\Interfaces\SublocationRepositoryInterface'); return $sublocationrepo->findorNew($sublocation); }); } } /** * Define the routes for the package. * * @return void */ public function map() { $this->mapWebRoutes(); $this->mapApiRoutes(); } /** * 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'); }); } /** * Define the "api" routes for the package. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { Route::group([ 'middleware' => 'api', 'namespace' => $this->namespace, 'prefix' => 'api', ], function ($router) { require (__DIR__ . '/../../routes/api.php'); }); } }