app/Http/Controllers/ContactController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $contact = new Contact;
        $contact->name = $request['name'];
        $contact->phone = $request['phone'];
        $contact->email = $request['email'];
        $contact->subject = $request['subject'];
        $contact->description = $request['description'];
        $contact->save();
        return back()->with('success', 'Message has been sent successfully');
    }
public function store ( Request $ request ) { $ contact = new Contact ; $ contact -> name = $ request [ 'name' ] ; $ contact -> phone = $ request [ 'phone' ] ; $ contact -> email = $ request [ 'email' ] ; $ contact -> subject = $ request [ 'subject' ] ; $ contact -> description = $ request [ 'description' ] ; $ contact -> save ( ) ; return back ( ) -> with ( 'success' , 'Message has been sent successfully' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .