khsing / laravel-world

provide countries, states, and cities relations and database.
MIT License
427 stars 89 forks source link

Call to undefined function Khsing\World\starts_with() #23

Closed muhammedriyaz closed 3 years ago

muhammedriyaz commented 4 years ago

I have installed laravel-worl and initiated. Whenever I call any method , for eg: World::getByCode('cn'); getting this error _Symfony\Component\Debug\Exception\FatalThrowableError Call to undefined function Khsing\World\startswith() . Please help asap.

gregorytoscano commented 4 years ago

I had this exact issue. The files I got from the composer command came with an outdated version of WorldTrait.php, I took a look at that code between the two WorldTrait.php files and the two didn't match. Copy the WorldTrait.php code from Github and overwrite your current code. This solved the issue for me.

khsing commented 4 years ago

this function does not exist in new Laravel, pls upgrade to v0.9 version.