예제 #1
0
 public function confirmBudget($id)
 {
     $budget = Budget::find($id);
     $budget->status = "Confirmado";
     $budget->save();
     $today = date("Y-m-d");
     $dataDebt = ['total' => $budget->total, 'patient_id' => $budget->Patient->id, 'budget_id' => $budget->id, 'date' => $today];
     $debt = new Debt($dataDebt);
     $debt->save();
     return "Actualizado";
 }
예제 #2
0
 public function index()
 {
     return Debt::with('user')->get();
 }