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.
28 lines
737 B
PHP
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();
|
|
}
|
|
}
|