jonnybarnes.uk/database/seeders/PlacesTableSeeder.php

27 lines
688 B
PHP
Raw Normal View History

2016-05-19 15:01:28 +01:00
<?php
2020-10-17 17:15:06 +01:00
namespace Database\Seeders;
use App\Models\Place;
2016-05-19 15:01:28 +01:00
use Illuminate\Database\Seeder;
class PlacesTableSeeder extends Seeder
{
/**
2023-02-18 09:34:57 +00:00
* Seed the places table.
2016-05-19 15:01:28 +01:00
*/
2023-02-18 09:34:57 +00:00
public function run(): void
2016-05-19 15:01:28 +01:00
{
$place = new Place();
$place->name = 'The Bridgewater Pub';
$place->description = 'A lovely local pub with a decent selection of cask ales';
2020-10-17 10:56:20 +01:00
$place->latitude = 53.4983;
$place->longitude = -2.3805;
2017-06-30 14:01:26 +01:00
$place->external_urls = 'https://foursquare.com/v/123435/the-bridgewater-pub';
$place->external_urls = 'https://www.openstreetmap.org/way/987654';
$place->save();
2020-10-17 17:15:06 +01:00
Place::factory(10)->create();
2016-05-19 15:01:28 +01:00
}
}