From d9db1cf8b1fec8e2d7296118589eea7db8522077 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 22 Aug 2019 21:22:00 -0600 Subject: [PATCH] Update FollowerController --- app/Http/Controllers/FollowerController.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/FollowerController.php b/app/Http/Controllers/FollowerController.php index 5ed9b170..bd3f4b67 100644 --- a/app/Http/Controllers/FollowerController.php +++ b/app/Http/Controllers/FollowerController.php @@ -23,16 +23,11 @@ class FollowerController extends Controller public function store(Request $request) { $this->validate($request, [ - 'item' => 'required|integer', + 'item' => 'required|string', ]); - $item = $request->input('item'); + $item = (int) $request->input('item'); $this->handleFollowRequest($item); - if($request->wantsJson()) { - return response()->json([ - 200 - ], 200); - } - return redirect()->back(); + return response()->json(200); } protected function handleFollowRequest($item)