From 1e65d8ea481902eb8974fc64102d4998e8527401 Mon Sep 17 00:00:00 2001 From: kyledoesdev Date: Sat, 3 Jan 2026 13:58:18 -0500 Subject: [PATCH 1/2] fix form defaults --- app/Livewire/Forms/PhotoForm.php | 6 +++--- resources/views/livewire/photos/gallery.blade.php | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Livewire/Forms/PhotoForm.php b/app/Livewire/Forms/PhotoForm.php index b0a2ecd..d58fa15 100644 --- a/app/Livewire/Forms/PhotoForm.php +++ b/app/Livewire/Forms/PhotoForm.php @@ -14,13 +14,13 @@ class PhotoForm extends Form { #[Validate('required|string')] - public ?string $name; + public string $name = ''; #[Validate('nullable|date')] - public ?string $capturedAt; + public string $capturedAt = ''; #[Validate('nullable|string|max:255')] - public ?string $description; + public string $description = ''; #[Validate('required|integer|in:1,3', message: 'The Photo Type is Required')] public int $type = Asset::PHOTO; diff --git a/resources/views/livewire/photos/gallery.blade.php b/resources/views/livewire/photos/gallery.blade.php index 39962f3..7ba693b 100644 --- a/resources/views/livewire/photos/gallery.blade.php +++ b/resources/views/livewire/photos/gallery.blade.php @@ -17,9 +17,11 @@
{{ $photo->name }} - {{ $photo->description }} + @if (!is_null($photo->description) && $photo->description !== '') + {{ $photo->description }} + @endif - {{ $photo->captured_at }} + {{ $photo->captured_at ?? $photo->created_at }}
From 6e976f694500db0a9365c53a7d54839ba2b76b4b Mon Sep 17 00:00:00 2001 From: kyledoesdev Date: Sat, 3 Jan 2026 13:59:35 -0500 Subject: [PATCH 2/2] readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4af0e31..25fbbd2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ ## Kyle Evangelisto's [website](https://kyledoes.dev) +Custom CMS backend built with Livewire & FluxUI + FluxUI, Livewire, Laravel, AlpineJs & TailwindCSS