コード例 #1
0
ファイル: APIController.php プロジェクト: VoodooPrawn/finest
 public function getAppointments()
 {
     $appointments = Appointment::all();
     $response = ["appointments" => $appointments->toArray()];
     header('Content-type: application/json');
     die(json_encode($response));
 }
コード例 #2
0
 public function updateAppointments()
 {
     $appointments = Appointment::all();
     foreach ($appointments as $appointment) {
         $lead = Lead::where('id', $appointment->lead_id)->first();
         if ($lead) {
             $appointment->agent_id = $lead->agent_crest_id;
             $appointment->save();
         }
     }
 }
コード例 #3
0
ファイル: Appointment.php プロジェクト: phizaz/se2015-backend
 public static function getAppointmentStaff()
 {
     return ["success" => true, Appointment::all()];
 }