Ejemplo n.º 1
0
 public static function add($meeting_place_id, $user_id, $suggested_by)
 {
     $model = new MeetingPlaceChoice();
     $model->meeting_place_id = $meeting_place_id;
     $model->user_id = $user_id;
     // set initial choice status based if they suggested it themselves
     if ($suggested_by == $user_id) {
         $model->status = self::STATUS_YES;
     } else {
         $model->status = self::STATUS_UNKNOWN;
     }
     $model->save();
 }