app->make('Bixo\Locations\Interfaces\CountryRepositoryInterface'); return $countryrepo->findorNew($country); }); } if (Request::is('*/locations/city/*')) { Route::bind('city', function ($city) { $cityrepo = $this->app->make('Bixo\Locations\Interfaces\CityRepositoryInterface'); return $cityrepo->findorNew($city); }); } if (Request::is('*/locations/location/*')) { Route::bind('location', function ($location) { $locationrepo = $this->app->make('Bixo\Locations\Interfaces\LocationRepositoryInterface'); return $locationrepo->findorNew($location); }); } if (Request::is('*/locations/properties/*')) { Route::bind('properties', function ($properties) { $propertiesrepo = $this->app->make('Bixo\Locations\Interfaces\PropertiesRepositoryInterface'); return $propertiesrepo->findorNew($properties); }); } if (Request::is('*/locations/sublocation/*')) { Route::bind('sublocation', function ($sublocation) { $sublocationrepo = $this->app->make('Bixo\Locations\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'); }); } }