Ejemplo n.º 1
0
 public function store(contactRequest $request)
 {
     $Inputs = Input::all();
     /*$data=array(
           'contact_name'=>$Inputs["c_name"],
           'contact_number'=>$Inputs["c_number"],
           'contact_email'=>$Inputs["c_email"],
           
       );*/
     // contactModel::create($request->all($data));
     contactModel::create($request->all());
     return redirect('index');
 }
 public function confirmquestion(contactRequest $request)
 {
     if ($request->session()->has('contact')) {
         $request->session()->forget('contact');
     }
     $contact['question'] = $request->question;
     $contact['user_name'] = $request->name;
     $contact['phone'] = $request->phone;
     $contact['email'] = $request->email;
     $contact['auction'] = Auction::where('id', '=', $request->auction_id)->first();
     $request->session()->push('contact', $contact);
     return view('contactconfirm');
 }
Ejemplo n.º 3
0
 /**
  * Send contact message method.
  */
 public function postContact(contactRequest $request)
 {
     $c = new Contact($request->only('email', 'type', 'subject', 'message'));
     $c->save();
     \Session::flash('message', 'Message sent successfully');
     if (\Auth::check()) {
         return redirect()->route('home');
     }
     return redirect()->route('index');
 }