Determine the geographical location of website visitors based on their IP addresses.

Overview
Comments
  • When CACHE_DRIVER=file =>

    When CACHE_DRIVER=file => "This cache store does not support tagging"

    Hi,

    When "CACHE_DRIVER=file" is receive this error: BadMethodCallException in Repository.php line 391: This cache store does not support tagging. in Repository.php line 391 at Repository->tags(array('torann-geoip-location')) in CacheManager.php line 301 at CacheManager->__call('tags', array(array('torann-geoip-location'))) in Cache.php line 32 at Cache->__construct(object(CacheManager), array('torann-geoip-location'), '30') in GeoIP.php line 91

    Unfortunatly, I must configure my cache this way to make it work: CACHE_DRIVER=array

    FYI, I'm upgrading from 0.2 to 1.0. Was working with "CACHE_DRIVER=file"

    Any ideas?

    opened by paceband 19
  • Class 'Torann\GeoIP\GeoIPFacade' not found

    Class 'Torann\GeoIP\GeoIPFacade' not found

    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);
            }
        }
    
    opened by sogeniusio 16
  • The GeoIP service is not valid.

    The GeoIP service is not valid.

    Hi all, I am using laravel 5.5. I have config on app.config for Provider and Aliases. When i call: $location = GeoIP::getLocation(); --> Bug: THe GeoIP service is not valid. (In GeoIP.php line 205)

    Help me!

    opened by hitechqb 9
  • Non-static method Torann\GeoIP\GeoIP::getLocation() should not be called statically, assuming $this from incompatible context

    Non-static method Torann\GeoIP\GeoIP::getLocation() should not be called statically, assuming $this from incompatible context

    Attempted to use this several different ways. Do I need to sign up for an external account in order to use this? Not very clear from the documentation - not sure if maxmind is optional or required. I also see that another issue was posted with the same error.

    Here is my test:

    // Routes.php
    use Torann\GeoIP\GeoIP;
    Route::get('geoip', function() {
        $location = GeoIP::getLocation();
    });
    
    opened by opheliadesign 9
  • Double ip address not returning proper location

    Double ip address not returning proper location

    Hello After much debug I discovered that my server is returning a double ip address for the remote ip. The remote ip looks like xxx.xxx.xxx.xxx, yyy.yyy.yyy.yyy and the resulting location is returned with default => 1

    The double IP is coming from an apache config involving reverse proxy and I have no control over it. Perhaps the package could account for it and just take the first ip?

    opened by rickshawhobo 8
  • Support for Laravel 7

    Support for Laravel 7

    Also some opinionated removal of PHP 7.1 and Laravel 5.5 support. The current version that supports Laravel 5.5 is stable and working, so let's move forward.

    opened by mikemand 7
  • Undefined method reference...

    Undefined method reference...

    Hi,

    I would just like to point out a reference to a method that does not (or no longer) exists..

    https://github.com/Torann/laravel-geoip/blob/d00e9b5b9c8e9c79c47fc4d78d4b47db1cd532c3/src/GeoIP.php#L164

    image

    Possible fix: https://github.com/Seldaek/monolog/commit/d686f25f6c1ce9706e23cf1c6f97c76e8bf83d09

    opened by PhoenixPeca 7
  • Allow dependency injection

    Allow dependency injection

    Allow dependency injection. To avoid using a global variable.

        use Torann\GeoIP\GeoIP;
    
        public function login(GeoIP $geoip)
        {
            return $geoip->getLocation($request->ip())->toArray();
        }
    
    opened by KaliaJS 6
  • Fix MaxMind database fetching

    Fix MaxMind database fetching

    This is a follow-up to #163 that is intended to fix #162.

    It expands on the work by @tylermann - with a couple of differences.

    Instead of adding the database filename to the config it searches for the first file with the extension .mmdb and assumes this is the correct one. Seems like a little simpler to me though less configurable - open to feedback here.

    It would be great if we could leverage Laravel's filesystem adapter as it would clean up much of the directory creation/removal code, but that's probably part of a larger discussion.

    opened by dwightwatson 6
  • Laravel 5.3 issue?

    Laravel 5.3 issue?

    Hello,

    I am getting the following:

    php artisan geoip:update The current service "Illuminate\Foundation\Application" does not support updating.

    Also, whenever I use the geoip helper I am getting:

    geoip('192.168.0.1');

    [Symfony\Component\Debug\Exception\FatalThrowableError]
    Call to undefined method Illuminate\Foundation\Application::hydrate()

    Any idea?

    opened by mendrinos 6
  • Support MaxMind country database

    Support MaxMind country database

    It would be great if this extension would support the usage of only the MaxMind country database as well (also for the Laravel 4 version), since the commercial version of it is much cheaper than the city database.

    opened by tholu 5
  • Support for both Country and City database for MAXMIND GeoIP2

    Support for both Country and City database for MAXMIND GeoIP2

    Right now there is only support for city Database for MAXMIND GeoIP2. A config for choosing any of those option would be much appreciated and versatile. This exception occurred when a country database is used.

    BadMethodCallException {#1783 ▼
      #message: "The city method cannot be used to open a GeoIP2-Country database"
      #code: 0
      #file: "/var/www/vendor/geoip2/geoip2/src/Database/Reader.php"
      #line: 254
    }
    
    opened by NilsBohr14 0
  • fix: temporary fix openssl issue on some machine

    fix: temporary fix openssl issue on some machine

    Hello,

    Php currently have an issue with openssl https://github.com/php/php-src/issues/8369,

    For some machine, file_get_contents and file_put_contents will fail, we could fix it with this approach https://github.com/guzzle/psr7/issues/504#issuecomment-1114693965, but I think it overkill for a simple database update command.

    I'll revert this commit sometime in the future when php got fix.

    opened by kocoten1992 0
  • Error: Declaration of Torann\GeoIP\Location::offsetExists(Torann\GeoIP\mixed $offset): bool must be compatible with ArrayAccess::offsetExists($offset)

    Error: Declaration of Torann\GeoIP\Location::offsetExists(Torann\GeoIP\mixed $offset): bool must be compatible with ArrayAccess::offsetExists($offset)

    Trying to get this working:

    • Laravel 8.0 on PHP 7.3.16-fpm
    • Installed laravel-geoip with Composer
    • Cache Driver to Array
    • Installed geoip2 with Composer
    • Set /config/geoip.php 'service' to use 'maxmind_database'
    • Created Maxmin account and added Maxmind credentials to .env
    // Running this
    $location = \GeoIP::getLocation(\Request::ip());
    
    // Gives me:
    Declaration of Torann\GeoIP\Location::offsetExists(Torann\GeoIP\mixed $offset): bool must be compatible with ArrayAccess::offsetExists($offset)
    
    opened by netm 0
  • geoip:update with maxmind_database uses too much memory

    geoip:update with maxmind_database uses too much memory

    I get:

    PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 36864 bytes) in /var/app/current/vendor/torann/geoip/src/Services/MaxMindDatabase.php on line 78
    PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 131072 bytes) in /var/app/current/vendor/sentry/sentry/src/HttpClient/Plugin/GzipEncoderPlugin.php on line 53
    

    Perhaps we could use https://github.com/splitbrain/php-archive to reduce memory use?

    opened by jordanade 0
Releases(3.0.4)
This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.

Laravel Verify New Email Laravel supports verifying email addresses out of the box. This package adds support for verifying new email addresses. When

Protone Media 300 Dec 30, 2022
A Laravel (php) package to interface with the geo-location services at geonames.org.

geonames v7.x A Laravel (php) package to interface with the geo-location services at geonames.org. Major Version Jump I jumped several major versions

Michael Drennen 82 Nov 24, 2022
My aim is to make a complete website that should have all the essential parts a website should have.

Gaming-Ninja I aim to make a complete website that should have all the essential parts a website should have. https://gamingninja-3399.000webhostapp.c

Anand Jaiswar 3 Nov 23, 2022
An Eloquent Way To Filter Laravel Models And Their Relationships

Eloquent Filter An Eloquent way to filter Eloquent Models and their relationships Introduction Lets say we want to return a list of users filtered by

Eric Tucker 1.5k Jan 7, 2023
This package gives Eloquent models the ability to manage their friendships.

Laravel 5 Friendships This package gives Eloquent models the ability to manage their friendships. You can easily design a Facebook like Friend System.

Alex Kyriakidis 690 Nov 27, 2022
Madison is a platform for lawmakers to share legislation with their citizens, allowing the community to add comments and suggest improvements.

Madison Madison is an open-source document engagement and feedback platform. While Madison can be used to collaborate on many different kinds of docum

OpenGov Foundation 591 Dec 17, 2022
GitScrum is a Project Management Tool, developed to help entrepreneurs, freelancers, managers, and teams Skyrocket their Productivity with the Agile methodology and Gamification.

What is GitScrum? GitScrum is a Project Management Tool, developed to help entrepreneurs, freelancers, managers, and teams Skyrocket their Productivit

GitScrum 2.8k Dec 29, 2022
An Eloquent Way To Filter Laravel Models And Their Relationships

Eloquent Filter An Eloquent way to filter Eloquent Models and their relationships Introduction Lets say we want to return a list of users filtered by

Eric Tucker 1.5k Dec 30, 2022
Log executed Laravel SQL queries and their line number and more

A lightweight laravel package for logging executed SQL queries, line number and more

Md.Harun-Ur-Rashid 31 Dec 21, 2022
Rebuild the todo website with Laravel and Vue

Lara-Todo This is a course that I took at Udmey, to create a todo website with Laravel and Vue.js Start First we need to download and setup Composer.

AmirH.Najafizadeh 6 Jul 31, 2022
PHP client library for reCAPTCHA, a free service to protect your website from spam and abuse.

reCAPTCHA PHP client library reCAPTCHA is a free CAPTCHA service that protects websites from spam and abuse. This is a PHP library that wraps up the s

Google 3.3k Dec 23, 2022
Laravel package that converts your application into a static HTML website

phpReel Static Laravel Package phpReel Static is a simple Laravel Package created and used by phpReel that converts your Laravel application to a stat

phpReel 16 Jul 7, 2022
this package makes laravel website a progressive web application.

Laravel PWA You can follow this video tutorial as well for installation. Installation Install the package by the following command, composer require l

Shailesh Ladumor 86 Dec 16, 2022
A simple website to inform you where to watch anime legally in Indonesia.

WibuSaka A simple app to inform you where to watch anime legally in Indonesia. WibuSaka uses Jikan.moe API to fetch anime datas. Requirements PHP 7.4+

Azhar At Zauhar Dripana 49 Oct 24, 2022
A blog website with blog details with laravel

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

PreshDev 3 Mar 6, 2022
This Laravel 8 package makes it possible for you to set your website in "Under Construction" mode.

Laravel Under Construction This Laravel package makes it possible to set your website in "Under Construction" mode. Only users with the correct 4 digi

Lars Janssen 571 Dec 18, 2022
Modeling online shopping website with PHP/Laravel

Online Shop M-54 Bootcamp final project. Modeling digikala website with PHP/Laravel. Creating a simple WooComers website with Laravel and Blade. Tools

AmirH.Najafizadeh 6 Aug 14, 2022
PlayZ is an esport event organization and management website allowing the creation of tournaments on the most popular video games of the esport scene.

PlayZ the playz to play Table of Contents Description "What is Playz?" In one sentence PlayZ is "an esport event organization and management website a

Antoine Saunier 2 Dec 7, 2021
Source code for the filamentadmin.com website.

Filament Demo App A demo application to illustrate how Filament Admin works. Installation Clone the repo locally: https://github.com/laravel-filament/

Filament 197 Jan 3, 2023