Пример #1
0
 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']);
 }
Пример #2
0
 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;
 }
Пример #3
0
 protected function getUserFollow($user_id)
 {
     return FollowServiceFacade::getUserFollow($user_id);
 }