/**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(ReviewRequest $request)
 {
     $settings = Settings::getArray();
     if (!$settings['page_review'] or !$settings['review_create']) {
         abort(404);
     }
     $data = $request->all();
     $data['ip'] = $request->server('REMOTE_ADDR');
     $data['active'] = $settings['review_moderate'] ? 0 : 1;
     Review::create($data);
     // sending notification
     //  if(!Settings::item('page_contact') or !Settings::item('contact_form')) abort(404);
     if ($settings['review_to_email']) {
         $data['name'] = $settings['company_name'];
         $data['subject'] = $settings['company_name'] . '| New review added';
         $data['admin_email'] = $settings['admin_email'];
         Mail::send('emails.review', $data, function ($message) use($data) {
             $message->subject($data['subject']);
             $message->to($data['admin_email']);
         });
     }
     return back()->with(['message' => trans('admin/reviews.message.add_success')]);
 }