Torann / laravel-geoip

Determine the geographical location of website visitors based on their IP addresses.
http://lyften.com/projects/laravel-geoip
BSD 2-Clause "Simplified" License
2.07k stars 372 forks source link

Use Package in normal php project #199

Closed muarachmann closed 3 years ago

muarachmann commented 3 years ago

Hi, I have a basic php project that stems for long now, was wondering how I could autoload the classes. I have tried to no avail, the helper functions load but when I run for example geoip()->getLocation(), I get undefined function app(). Equally when I use the class, I getClass 'Torann\GeoIP'. Any help would be greatly appreciated thanks

  "autoload": {
        "psr-4": {
            "Torann\\GeoIP\\": "app/vendor/torann/geoip/src"
        },
        "files": [
            "app/vendor/torann/geoip/src/helpers.php"
        ]
    }
muarachmann commented 3 years ago

Looks like this is Laravel specific?