/** * Store a newly created enquiry in storage. * * @return Response */ public function store() { $validator = Validator::make($data = Input::all(), Enquiry::$rules); if ($validator->fails()) { return Redirect::back()->withErrors($validator)->withInput(); } $enquiry = new Enquiry(); $enquiry->date = date('Y-m-d'); $enquiry->client = Input::get('name'); $enquiry->subject = Input::get('subject'); $enquiry->description = Input::get('description'); $enquiry->save(); return Redirect::route('enquiries.index'); }