/**
  * Store a newly created resource in storage.
  *
  * @return \Illuminate\Support\Facades\Response
  */
 public function store(FormRequest $request)
 {
     $data = [];
     foreach ($request->all() as $key => $value) {
         $data[$key] = strip_tags($value);
     }
     VNewsletter::subscribe($data['email']);
     $newsletter = $this->repository->create($data);
     event('NewNewsletterRequest', [$newsletter]);
     return redirect()->route(config('app.locale') . '.newsletter.sent')->with('success', true);
 }
 /**
  * Update the specified resource in storage.
  *
  * @param \TypiCMS\Modules\Newsletter\Shells\Models\Newsletter         $newsletter
  * @param \TypiCMS\Modules\Newsletter\Shells\Http\Requests\FormRequest $request
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function update(Newsletter $newsletter, FormRequest $request)
 {
     $this->repository->update($request->all());
     return $this->redirect($request, $newsletter);
 }