Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## Kyle Evangelisto's [website](https://kyledoes.dev)

Custom CMS backend built with Livewire & FluxUI

FluxUI, Livewire, Laravel, AlpineJs & TailwindCSS
6 changes: 3 additions & 3 deletions app/Livewire/Forms/PhotoForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions resources/views/livewire/photos/gallery.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
<div class="my-2">
<flux:text>{{ $photo->name }}</flux:text>

<flux:text variant="subtle" class="text-xs">{{ $photo->description }}</flux:text>
@if (!is_null($photo->description) && $photo->description !== '')
<flux:text variant="subtle" class="text-xs">{{ $photo->description }}</flux:text>
@endif

<flux:text class="mt-2" size="sm">{{ $photo->captured_at }}</flux:text>
<flux:text class="mt-2" size="sm">{{ $photo->captured_at ?? $photo->created_at }}</flux:text>
</div>
</div>

Expand Down