Not sure what I'm doing wrong here...
Specs:
- Laravel 5.4
- Mac
- "torann/geoip": "^1.0"
- "geoip2/geoip2": "^2.4"
Any ideas...
app.php
'providers' => [
...
Torann\GeoIP\GeoIPServiceProvider::class,
...
'aliases' => [
...
'GeoIP' => Torann\GeoIP\GeoIPFacade::class,
...
PagesController.php
...
use Torann\GeoIP\GeoIPFacade as GeoIP; // I've tried this,
use GeoIP as GeoIP; // this,
use GeoIP; // and this...
...
public function getHome()
{
...
$data['visits'] = Redis::incr('visits');
$data['$location'] = GeoIP::getLocation();
return View::make('pages.home', $data);
...
}
home.blade.php
...
<!-- USER :: DATA -->
<!-- Visit #{{ $visits }} -->
<!-- {{ $location }} -->
...
Error: Class 'Torann\GeoIP\GeoIPFacade' not found
/Users/user/Sites/sogenius/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php
if (static::$facadeNamespace && strpos($alias, static::$facadeNamespace) === 0) {
$this->loadFacade($alias);
return true;
}
if (isset($this->aliases[$alias])) {
return class_alias($this->aliases[$alias], $alias);
}
}