public function deleteFollow(Request $request) { $data['user_image_id'] = $request->user_id; $data['user_id'] = $this->user_id; $result = FollowServiceFacade::deleteFollow($data); if ($result) { return response()->json(['result' => 'OK']); } return response()->json(['result' => 'error']); }
protected function getInforActiveAndFollow() { $data = []; $data['active-img'] = ImageServiceFacade::countTotalPhoto($this->user_id); $data['active-follow'] = FollowServiceFacade::countUserFollow($this->user_id); //mình theo dõi $data['active-follower'] = FollowServiceFacade::countFollower($this->user_id); //theo dõi mình $data['follow'] = FollowServiceFacade::getFollow($this->user_id); return $data; }
protected function getUserFollow($user_id) { return FollowServiceFacade::getUserFollow($user_id); }