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.1k stars 373 forks source link

GeoIP not working #198

Open burhanahmed92 opened 3 years ago

burhanahmed92 commented 3 years ago

I am using Laravel 8 and using "torann/geoip": "^3.0.2"

I followed all steps and using maxmind_database for service. i also updated it in geoip.php file. I added my mmdb file inside storage/app folder. After doing all this. I am trying to call GeoIP class in my controller like this:

use Torann\GeoIP\Facades\GeoIP;
public function index()
    {
        dd(GeoIP($ip = '127.0.0.1'));
        $data = array(
            'title'=>'My App',
        );
        return view('home')->with($data);;
    }

But gives me an error

Call to undefined function camel_case()

Kindly guide what am I missing.

burhanahmed92 commented 3 years ago

I also checked the config/app.php it fine as given in document

muarachmann commented 3 years ago

I don't think this issue relates to this package, maybe you are using Laravels string functions do some stuff, can you check? with the latest version it uses Str::camel()