AymanElarian / laravel-sqlserver-extender by AymanElarian

Extend SQL Server Grammar for Laravel & Lumen to fix migration
273
1
3
Package Data
Maintainer Username: AymanElarian
Maintainer Contact: aymanstar@gmail.com (AymanElarian)
Package Create Date: 2018-09-21
Package Last Update: 2018-09-21
Language: PHP
License: MIT
Last Refreshed: 2024-04-18 15:27:43
Package Statistics
Total Downloads: 273
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

Laravel SQL Server Extender

Latest Version on Packagist Software License Total Downloads

This package extend the SQL Server driver from Laravel to fix the migration error due to using custom schema name and support sql server spatial

Install

Via Composer

$ composer require AymanElarian/laravel-sqlserver-extender

Once composer has been updated and the package has been installed, the service provider will need to be loaded.

For Laravel 5, open config/app.php and add following line to the providers array:

AymanElarian\Extensions\SqlServer\SpatialServiceProvider::class,

For Lumen 5, open bootstrap/app.php and add following line under the "Register Service Providers" section:

$app->register(AymanElarian\Extensions\SqlServer\SpatialServiceProvider::class);

For Laravel 4, open app/config/app.php and add following line to the providers array:

'AymanElarian\Extensions\SqlServer\SpatialServiceProvider',

TO DO : Development plan

  • [x] overwrite sql server grammer (compileTableExists method) to search by schema name
  • [x] refactor grimzy's Laravel mysql-spatial package to work with sql server
  • [x] support points in sql server
  • [x] support polygon in sql server
  • [ ] support all other types in sql server
  • [ ] fix all test cases to run with sql server

Usage

Once you included the service provider the Laravel/Lumen will start using the custom grammar.

Contributing

Contributions are very welcome. Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

Credits

Originally inspired and code refactored from grimzy's Laravel mysql-spatial package.