Beispiel #1
0
 public function follow($user_id)
 {
     $follow = new Follow();
     $follow->follower_id = $this->id;
     $follow->followed_user_id = $user_id;
     $follow->save();
 }
 /**
  * Handle the command.
  *
  * @param  FollowUserCommand  $command
  * @return void
  */
 public function handle(FollowUserCommand $command)
 {
     //
     $follow = new Follow();
     $follow->user_id = Auth::id();
     $follow->followed_id = $command->userId;
     $follow->save();
 }
 private function _follow($id)
 {
     //$hoge = Follow::add(Auth::user()->id, $id);
     $follow = new Follow();
     $follow->user_id = Auth::user()->id;
     $follow->follow_id = $id;
     $follow->save();
 }
 /**
  * Follow Artist
  *
  * @return View
  */
 public function Follow($id)
 {
     $user = Auth::user();
     $whom = User::find($id);
     if ($whom) {
         $follow = new Follow();
         $follow->user_id = $user->id;
         $follow->artist_id = $id;
         $follow->accepted = false;
         $follow->save();
         return redirect('artist/' . $artist->id)->with('success', 'Now you are following ' . $artist->user->firstname);
     }
     return redirect('artist/' . $artist->id);
 }
 public function linkPageFollow($id)
 {
     $linkfollow = Follow::where('corporate_id', '=', $id)->where('individual_id', '=', Auth::user()->induser_id)->first();
     if ($linkfollow == null) {
         $follow = new Follow();
         $follow->corporate_id = $id;
         $follow->individual_id = Auth::user()->induser_id;
         $follow->save();
     }
     return redirect('/links');
 }
Beispiel #6
0
 public function follow($id)
 {
     $follow = new Follow();
     $follow->corporate_id = $id;
     $follow->individual_id = Auth::user()->induser_id;
     $follow->save();
     return 'success';
 }