Skip to content

Commit

Permalink
fix: added missing tba banner
Browse files Browse the repository at this point in the history
  • Loading branch information
blt950 committed Aug 9, 2024
1 parent 8c9ab04 commit 34580cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/API/EventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function index(Calendar $calendar)

// Set the full path on the image attribute and add a full url to event
$events->transform(function ($event) {
$event->image = isset($event->image) ? asset('storage/banners/' . $event->image) : null;
$event->image = isset($event->image) ? asset('storage/banners/' . $event->image) : asset('images/tba.jpg');
$event->link = route('events.show', $event->id);
return $event;
});
Expand Down
Binary file added public/images/tba.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
@if ($event->image)
<img src={{ asset('storage/banners/' . $event->image) }} height="100">
@else
<img src="{{ asset('images/tba.jpg') }}" height="100">
@endif
<span class="d-none d-md-block">
{{ $event->title }}
Expand Down

0 comments on commit 34580cd

Please sign in to comment.