Skip to content

Commit

Permalink
Update GeospatialServiceProvider.php
Browse files Browse the repository at this point in the history
  • Loading branch information
dash8x authored May 29, 2024
1 parent 2ff6eff commit 8a16147
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/GeospatialServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
use Javaabu\Geospatial\Objects\Polygon;
use MatanYadaev\EloquentSpatial\Enums\Srid;

class GeospatialServiceProvider extends ServiceProvider
{
Expand Down Expand Up @@ -33,7 +32,7 @@ protected function registerCustomValidationRules()
* Rule works as wkt_polygon:srid
*/
Validator::extend('wkt_geo_polygon', function ($attribute, $value, $parameters) {
$srid = $parameters[0] ?? Srid::WGS84;
$srid = $parameters[0] ?? 4326;

try {
/** @var Polygon $polygon */
Expand Down

0 comments on commit 8a16147

Please sign in to comment.