Download the PHP package astrogin/laravel-mysql-spatial without Composer

On this page you can find all versions of the php package astrogin/laravel-mysql-spatial. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mysql-spatial

Laravel MySQL Spatial extension

Build Status Code Climate Code Climate Packagist Packagist

Laravel package to easily work with MySQL Spatial Data Types and MySQL Spatial Functions.

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.

Installation

Add the package using composer:

Register the service provider in config/app.php:

Quickstart

Create a migration

From the command line:

Then edit the migration you just created by adding at least one spatial data field:

Run the migration:

Create a model

From the command line:

Then edit the model you just created. It must use the SpatialTrait and define an array called $spatialFields with the name of the MySQL Spatial Data field(s) created in the migration:

Saving a model

Retrieving a model

Migration

Available MySQL Spatial Types migration blueprints:

Spatial index

You can add or drop spatial indexes in your migrations with the spatialIndex and dropSpatialIndex blueprints.

Note about spatial indexes from the MySQL documentation:

For MyISAM and (as of MySQL 5.7.5) InnoDB tables, MySQL can create spatial indexes using syntax similar to that for creating regular indexes, but using the SPATIAL keyword. Columns in spatial indexes must be declared NOT NULL.

From the command line:

Then edit the migration you just created:

Models

Available geometry classes:

Credits

Originally inspired from njbarrett's Laravel postgis package.


All versions of laravel-mysql-spatial with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
illuminate/database Version ^5.2
geo-io/wkb-parser Version ^1.0
jmikola/geojson Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package astrogin/laravel-mysql-spatial contains the following files

Loading the files please wait ....