You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Laravel package to easily work with [MySQL Spatial Data Types](https://dev.mysql.com/doc/refman/8.0/en/spatial-type-overview.html) and [MySQL Spatial Functions](https://dev.mysql.com/doc/refman/8.0/en/spatial-function-reference.html).
10
7
11
8
Please check the documentation for your MySQL version. MySQL's Extension for Spatial Data was added in MySQL 5.5 but many Spatial Functions were changed in 5.6 and 5.7.
12
9
13
-
**Versions**
14
-
15
-
-`1.x.x`: MySQL 5.6 (also supports MySQL 5.5 but not all spatial analysis functions)
16
-
-`2.x.x`: MySQL 5.7 and 8.0 (Laravel version < 8.0)
17
-
-`3.x.x`: MySQL 8.0 with SRID support (Laravel version < 8.0)
18
-
-**`4.x.x`: MySQL 8.0 with SRID support (Laravel 8+) [Current branch]**
19
-
-`5.x.x`: MySQL 5.7 and 8.0 (Laravel 8+)
10
+
**This package is a fork of https://github.com/grimzy/laravel-mysql-spatial and virtually all code was written by the contributors to that repo. Thank you!**
20
11
21
12
This package also works with MariaDB. Please refer to the [MySQL/MariaDB Spatial Support Matrix](https://mariadb.com/kb/en/library/mysqlmariadb-spatial-support-matrix/) for compatibility.
22
13
@@ -25,34 +16,10 @@ This package also works with MariaDB. Please refer to the [MySQL/MariaDB Spatial
Check out the [Class diagram](https://user-images.githubusercontent.com/1837678/30788608-a5afd894-a16c-11e7-9a51-0a08b331d4c4.png).
240
193
@@ -403,7 +356,7 @@ class UpdatePlacesTable extends Migration
403
356
Schema::table('places', function (Blueprint $table) {
404
357
// Make sure point is not nullable
405
358
$table->point('location')->change();
406
-
359
+
407
360
// Add a spatial index on the location field
408
361
$table->spatialIndex('location');
409
362
});
@@ -433,9 +386,6 @@ class UpdatePlacesTable extends Migration
433
386
434
387
```shell
435
388
$ composer test
436
-
# or
437
-
$ composer test:unit
438
-
$ composer test:integration
439
389
```
440
390
441
391
Integration tests require a running MySQL database. If you have Docker installed, you can start easily start one:
@@ -448,7 +398,7 @@ $ make start_db V=5.7 # starts MySQL 5.7
448
398
449
399
## Contributing
450
400
451
-
Recommendations and pull request are most welcome! Pull requests with tests are the best! There are still a lot of MySQL spatial functions to implement or creative ways to use spatial functions.
401
+
Recommendations and pull request are most welcome! Pull requests with tests are the best! There are still a lot of MySQL spatial functions to implement or creative ways to use spatial functions.
0 commit comments