Host images locally
Some checks failed
PHP Unit / PHPUnit test suite (pull_request) Has been cancelled
Laravel Pint / Laravel Pint (pull_request) Has been cancelled

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.
This commit is contained in:
Jonny Barnes 2024-10-25 20:40:52 +01:00
parent d80e8164c8
commit d7da42b626
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
47 changed files with 295 additions and 214 deletions

View file

@ -27,7 +27,7 @@ class ContactsTableSeeder extends Seeder
'homepage' => 'https://aaronparecki.com',
'facebook' => '123456',
]);
$fs = new FileSystem();
$fs = new FileSystem;
if (! $fs->exists(public_path('assets/profile-images/aaronparecki.com'))) {
$fs->makeDirectory(public_path('assets/profile-images/aaronparecki.com'));
}

View file

@ -20,7 +20,7 @@ class LikesTableSeeder extends Seeder
Like::factory(10)->create();
$now = Carbon::now()->subDays(rand(3, 6));
$faker = new Generator();
$faker = new Generator;
$faker->addProvider(new \Faker\Provider\en_US\Person($faker));
$faker->addProvider(new \Faker\Provider\Lorem($faker));
$faker->addProvider(new \Faker\Provider\Internet($faker));

View file

@ -154,7 +154,7 @@ class NotesTableSeeder extends Seeder
->update(['updated_at' => $now->toDateTimeString()]);
$now = Carbon::now()->subHours(5);
$noteJustCheckin = new Note();
$noteJustCheckin = new Note;
$noteJustCheckin->setCreatedAt($now);
$place = Place::find(1);
$noteJustCheckin->place()->associate($place);
@ -164,12 +164,12 @@ class NotesTableSeeder extends Seeder
->update(['updated_at' => $now->toDateTimeString()]);
$now = Carbon::now()->subHours(4);
$media = new Media();
$media = new Media;
$media->path = 'media/f1bc8faa-1a8f-45b8-a9b1-57282fa73f87.jpg';
$media->type = 'image';
$media->image_widths = '3648';
$media->save();
$noteWithOnlyImage = new Note();
$noteWithOnlyImage = new Note;
$noteWithOnlyImage->setCreatedAt($now);
$noteWithOnlyImage->setUpdatedAt($now);
$noteWithOnlyImage->save();

View file

@ -14,7 +14,7 @@ class PlacesTableSeeder extends Seeder
*/
public function run(): void
{
$place = new Place();
$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;