コード例 #1
0
ファイル: CommentsCache.php プロジェクト: vinelab/agency
 /**
  * Drop a reported comment. This is done by dropping a relationship b/w the user and the comment.
  *
  * @param  int        $comment_id
  * @param  \Fahita\Contracts\UserInterface $user
  *
  * @return bool
  */
 public function dropReport($comment_id, UserInterface $user)
 {
     return $this->set->remove($this->getReportsKey($comment_id), $user->getKey());
 }
コード例 #2
0
ファイル: Session.php プロジェクト: vinelab/agency
 /**
  * Generate an access token for the given user.
  *
  * @param \Agency\Contracts\UserInterface $user
  * @param string $token
  *
  * @return string
  */
 public function generateToken(UserInterface $user)
 {
     return md5($user->getAuthIdentifier() . $user->email . uniqid());
 }