Ejemplo n.º 1
0
 /**
  * Store a newly created Email in storage.
  *
  * @param CreateEmailRequest $request
  *
  * @return Response
  */
 public function store(CreateEmailRequest $request)
 {
     $input = $request->all();
     $email = $this->emailRepository->create($input);
     $data = ['user_name' => $input['name'], 'user_email' => $input['email'], 'user_message' => $input['message']];
     Mail::send('emails.feedback', $data, function ($m) {
         $m->to('*****@*****.**', 'iWomen Team');
         $m->subject('There is a new message from your user.');
     });
     Flash::success('Email saved successfully.');
     return redirect(route('emails.index'));
 }
Ejemplo n.º 2
0
 /**
  * Store a newly created people in storage.
  *
  * @param CreateEmailRequest $request
  * @return \Illuminate\Http\RedirectResponse
  */
 public function store(CreateEmailRequest $request)
 {
     Email::create($request->all());
     return redirect()->action('PagesController@manageEmails');
 }