diff --git a/database/migrations/2015_11_07_130637_create_places_table.php b/database/migrations/2015_11_07_130637_create_places_table.php index f34798c4..57f35f64 100644 --- a/database/migrations/2015_11_07_130637_create_places_table.php +++ b/database/migrations/2015_11_07_130637_create_places_table.php @@ -1,6 +1,6 @@ string('name'); $table->string('slug')->unique(); $table->text('description')->nullable(); - $table->point('location'); - $table->polygon('polygon')->nullable(); + $table->text('location'); + $table->text('polygon')->nullable(); $table->timestamps(); }); } diff --git a/database/seeds/PlacesTableSeeder.php b/database/seeds/PlacesTableSeeder.php index c905c182..0dbc5830 100644 --- a/database/seeds/PlacesTableSeeder.php +++ b/database/seeds/PlacesTableSeeder.php @@ -2,7 +2,6 @@ use App\Models\Place; use Illuminate\Database\Seeder; -use MStaack\LaravelPostgis\Geometries\Point; class PlacesTableSeeder extends Seeder { @@ -16,7 +15,8 @@ class PlacesTableSeeder extends Seeder $place = new Place(); $place->name = 'The Bridgewater Pub'; $place->description = 'A lovely local pub with a decent selection of cask ales'; - $place->location = new Point('53.4983', '-2.3805'); + $place->latitude = 53.4983; + $place->longitude = -2.3805; $place->external_urls = 'https://foursquare.com/v/123435/the-bridgewater-pub'; $place->external_urls = 'https://www.openstreetmap.org/way/987654'; $place->save();