Наследование: extends App\Http\Requests\Request
Пример #1
0
 public function handleResponse(FormResponseRequest $request)
 {
     $formResponse = FormResponse::create($request->except(['g-recaptcha-response']));
     Mail::send(new ContactFormSubmitted($formResponse));
     activity()->log("{$formResponse->email} vulde het contactformulier in");
     flash()->success(fragment('contact.response'));
     return redirect()->action('Front\\ContactController@index');
 }
Пример #2
0
 /**
  * @param \App\Http\Requests\Front\FormResponseRequest $request
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function handleResponse(FormResponseRequest $request)
 {
     $formResponse = FormResponse::create($request->all());
     event(new ContactFormSubmitted($formResponse));
     Activity::log($request->get('email') . ' vulde het contactformulier in');
     flash()->success(fragment('contact.response'));
     return redirect()->action('Front\\ContactController@index');
 }