2016-05-19 15:01:28 +01:00
|
|
|
<?php
|
|
|
|
|
2017-06-29 12:34:25 +01:00
|
|
|
use App\Place;
|
2016-05-19 15:01:28 +01:00
|
|
|
use Illuminate\Database\Seeder;
|
2017-06-29 12:34:25 +01:00
|
|
|
use Phaza\LaravelPostgis\Geometries\Point;
|
2016-05-19 15:01:28 +01:00
|
|
|
|
|
|
|
class PlacesTableSeeder extends Seeder
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the database seeds.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function run()
|
|
|
|
{
|
2017-06-29 12:34:25 +01:00
|
|
|
$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->external_urls = json_encode([
|
|
|
|
'foursqaure' => 'https://foursqaure.com/v/123435/the-bridgewater-pub',
|
|
|
|
'osm' => 'https://www.openstreetmap.org/way/987654',
|
2016-05-19 15:01:28 +01:00
|
|
|
]);
|
2017-06-29 12:34:25 +01:00
|
|
|
$place->save();
|
2016-05-19 15:01:28 +01:00
|
|
|
}
|
|
|
|
}
|