Example #1
0
 /**
  * @param Search $search
  * @param User   $user
  *
  * @return  bool
  */
 private function userResponseAccept(Search $search, User $user)
 {
     $searchList = $search->getLastList();
     /**
      * @var SearchListUser $searchListUser
      */
     $searchListUser = SearchListUser::whereUserId($user->id)->whereSearchListId($searchList->id)->first();
     $searchListUser->response_type = SearchListUser::RESPONSE_TYPE_ACCEPTED;
     $searchListUser->responsed_at = Carbon::now()->toDateTimeString();
     $searchListUser->save();
     return false;
 }