laravel-geoip
laravel-geoip copied to clipboard
Class 'Torann\GeoIP\Facades\GeoIP' not found
please find below Controller code
getClientIp(true); $arr_ip = GeoIP::getClientIP(); dd($arr_ip); $product = product::where('page_id',1)->where('active',1)->get(); $blog = product::where('page_id',2)->where('active',1)->get(); //dd($product); return view('index',compact('product','blog')); } }
You probably forgot to add 'GeoIP' => \Torann\GeoIP\Facades\GeoIP::class to your aliases in config/app.php
I have noticed that sometimes the:
"require": {
"torann/geoip": "^1.0"
},
in composer.json is removed when running composer update and then I get this error the solution for me is to rerun composer require torann/geoip hope this helps you.