From 9488b416a890465b035fac834cb1fbbc156b8a22 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Mon, 3 Jul 2017 15:59:54 -0700 Subject: [PATCH] reload slideshow every 5 minutes --- app/Http/Controllers/SlideshowController.php | 2 +- resources/views/slideshow.blade.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/SlideshowController.php b/app/Http/Controllers/SlideshowController.php index 0aec0d5..e288613 100644 --- a/app/Http/Controllers/SlideshowController.php +++ b/app/Http/Controllers/SlideshowController.php @@ -12,7 +12,7 @@ class SlideshowController extends Controller $photos = []; - $tweets = Tweet::where('processed', 1)->orderByRaw('RAND()')->get(); + $tweets = Tweet::where('processed', 1)->inRandomOrder()->get(); foreach($tweets as $tweet) { if($tweet->photo) { foreach(json_decode($tweet->photo) as $photo) { diff --git a/resources/views/slideshow.blade.php b/resources/views/slideshow.blade.php index a0993e5..5079670 100644 --- a/resources/views/slideshow.blade.php +++ b/resources/views/slideshow.blade.php @@ -2,7 +2,8 @@ Spy30 Slideshow - + +