Пример #1
0
 public function contactPost(Request $request)
 {
     $mails = Mail::with('object')->where('object_id', $request->get('subject'))->get();
     foreach ($mails as $mail) {
         $this->sendMail($mail, $request->all());
     }
     return redirect(route('contact'))->with('success', trans('contact.sent'));
 }
Пример #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $mails = Mail::with('object')->get();
     $title = 'Administration des emails';
     return view('admin.mails.index', compact('mails', 'title'));
 }
Пример #3
0
 public function mail()
 {
     $mails = Mail::with('novel')->with('chapter')->paginate(10);
     return view('mail', ['mails' => $mails, 'pageName' => 'mail']);
 }