jonnybarnes.uk/database/seeders/PlacesTableSeeder.php
Jonny Barnes d7da42b626
Some checks failed
PHP Unit / PHPUnit test suite (pull_request) Has been cancelled
Laravel Pint / Laravel Pint (pull_request) Has been cancelled
Host images locally
We don’t need the complexity of S3. Sepcifically the complexity of
managing my own AWS account, flysystem made the Laravel side easy.

A command is added to copy the the S3 files over to local storage.
2024-10-25 20:40:52 +01:00

28 lines
737 B
PHP

<?php
namespace Database\Seeders;
use App\Models\Place;
use Illuminate\Database\Seeder;
class PlacesTableSeeder extends Seeder
{
/**
* Seed the places table.
*
* @psalm-suppress PossiblyUnusedMethod
*/
public function run(): void
{
$place = new Place;
$place->name = 'The Bridgewater Pub';
$place->description = 'A lovely local pub with a decent selection of cask ales';
$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();
Place::factory(10)->create();
}
}