Update TimelineController

This commit is contained in:
Daniel Supernault 2020-02-18 00:38:25 -07:00
parent a84ff19451
commit c8abffb811
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -20,11 +20,19 @@ class TimelineController extends Controller
public function local(Request $request) 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) 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'));
} }
} }