grimzy/laravel-mysql-spatial

Laravel 10

swus13 opened this issue · 3 comments

Is the project dead?

Is there a way to use this package also in Laravel 10 via composer?

@swus13 I've got this working in my Laravel 10 app. I am only using the Point class and the distanceSphere query method, but these are at least working for me.

Can reference my fork:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/joshbaumann/laravel-mysql-spatial.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "grimzy/laravel-mysql-spatial": "dev-l10-compatibility",
    }
}

Finally, run: composer update

@joshbaumann

thanks for that, unfortunately it doesn't work for me.
For polygon and point I get the following errors now.

Exception: Unknown database type polygon requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it. Exception: Unknown database type point requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it.

on this artisan call:
php artisan ide-helper:models -W

Thanks @joshbaumann . I was upgrading an existing project taken from internet so i even dont have an idea how that package can be replaced with laravel 10 compatible alternatives. But with your repo, it just worked. Getting some warnings on debugbar but yet no exceptions. I am going to test if the project is still fully functionable.