From c8abffb81109659494c1c105426ebdf275c783dc Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 18 Feb 2020 00:38:25 -0700 Subject: [PATCH] Update TimelineController --- app/Http/Controllers/TimelineController.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/TimelineController.php b/app/Http/Controllers/TimelineController.php index df9fb5e52..52267b2d7 100644 --- a/app/Http/Controllers/TimelineController.php +++ b/app/Http/Controllers/TimelineController.php @@ -20,11 +20,19 @@ class TimelineController extends Controller public function local(Request $request) { - return view('timeline.local'); + $this->validate($request, [ + 'layout' => 'nullable|string|in:grid,feed' + ]); + $layout = $request->input('layout', 'feed'); + return view('timeline.local', compact('layout')); } public function network(Request $request) { - return view('timeline.network'); + $this->validate($request, [ + 'layout' => 'nullable|string|in:grid,feed' + ]); + $layout = $request->input('layout', 'feed'); + return view('timeline.network', compact('layout')); } }