public function devisRepair($id, Request $req, Invoice $invoice) { $repair = File::where('id', $id)->with('repair.details.article', 'repair.device.modele.brand', 'repair.device.modele.category', 'client')->first(); if ($req['_action'] == "sendmail") { $response = $invoice->sendDevisRepairMail($repair); return $response; } return view('/files/devis-repair', ['repair' => $repair]); }