2016-05-19 15:01:28 +01:00
|
|
|
<?php
|
|
|
|
|
2020-10-17 17:15:06 +01:00
|
|
|
namespace Database\Seeders;
|
|
|
|
|
2017-12-22 14:28:41 +00:00
|
|
|
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
|
|
|
{
|
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';
|
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';
|
2017-06-29 12:34:25 +01:00
|
|
|
$place->save();
|
2020-10-17 17:15:06 +01:00
|
|
|
|
|
|
|
Place::factory(10)->create();
|
2016-05-19 15:01:28 +01:00
|
|
|
}
|
|
|
|
}
|