diff --git a/app/Http/Controllers/SlideshowController.php b/app/Http/Controllers/SlideshowController.php index e288613..c9c8eec 100644 --- a/app/Http/Controllers/SlideshowController.php +++ b/app/Http/Controllers/SlideshowController.php @@ -18,7 +18,7 @@ class SlideshowController extends Controller foreach(json_decode($tweet->photo) as $photo) { $photos[] = [ 'img' => $photo, - 'description' => $tweet->team->name . ' Team: ' . $tweet->text + 'description' => ($tweet->team ? $tweet->team->name . ' Team: ' : '') . $tweet->text ]; } }