Exemplo n.º 1
0
 public function saveContactUs(Request $request)
 {
     $input = $request->input();
     $cu = new ContactUs();
     $cu->full_name = $input['inputName'];
     $cu->email = $input['inputEmail'];
     $cu->phone = $input['inputPhone'];
     $cu->body = $input['inputMessage'];
     $cu->subject = $input['inputSubject'];
     $cu->save();
     // Mail::send('email', $input, function($message)
     // {
     //     $message->to('*****@*****.**', 'Reza Shayesteh')->subject('New Lead');
     // });
     //dd($input);
     return "success";
 }
Exemplo n.º 2
0
 public function adminDelete($id)
 {
     $data = \App\ContactUs::find($id);
     $data->delete();
     Session::flash('success', 'Data pesan masuk berhasil dihapus');
     return redirect()->route('admin.contact-us');
 }