laravel-geoip icon indicating copy to clipboard operation
laravel-geoip copied to clipboard

GeoIP not working

Open burhanahmed92 opened this issue 4 years ago • 2 comments

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 avatar Jan 26 '21 12:01 burhanahmed92

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

burhanahmed92 avatar Jan 26 '21 12:01 burhanahmed92

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()

muarachmann avatar Jan 29 '21 17:01 muarachmann