Stevebauman\Location\Location::get PHP Méthode

get() public méthode

Retrieve the users location.
public get ( string $ip = '' ) : Position | boolean
$ip string
Résultat Position | boolean
    public function get($ip = '')
    {
        if (session()->has($this->key)) {
            return session($this->key);
        }
        if ($location = $this->driver->get($ip ?: $this->getClientIP())) {
            // We'll store the location inside of our session
            // so it isn't retrieved on the next request.
            session([$this->key => $location]);
            return $location;
        }
        return false;
    }