/** * get the diagnostic page for email sending. * * @return type view */ public function getDiag(Emails $email) { try { $emails = $email->all(); return view('diagnostic.index', compact('emails')); } catch (Exception $e) { return redirect()->back()->with('fails', $e); } }