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->prenom = $request->prenom;
        $contact->nom = $request->nom;
        $contact->titre = $request->titre;
        $contact->email_1 = $request->email_1;
        $contact->email_1_type = $request->email_1_type;
        $contact->email_2 = $request->email_2;
        $contact->email_2_type = $request->email_2_type;
        $contact->phone_1 = $request->phone_1;
        $contact->phone_1_type = $request->phone_1_type;
        $contact->phone_2 = $request->phone_2;
        $contact->phone_2_type = $request->phone_2_type;
        $contact->companie_id = $request->companie_id;
        $contact->notes = $request->notes;
        $contact->save();
    }
public function store ( Request $ request ) { $ contact = new Contact ( ) ; $ contact -> prenom = $ request -> prenom ; $ contact -> nom = $ request -> nom ; $ contact -> titre = $ request -> titre ; $ contact -> email_1 = $ request -> email_1 ; $ contact -> email_1_type = $ request -> email_1_type ; $ contact -> email_2 = $ request -> email_2 ; $ contact -> email_2_type = $ request -> email_2_type ; $ contact -> phone_1 = $ request -> phone_1 ; $ contact -> phone_1_type = $ request -> phone_1_type ; $ contact -> phone_2 = $ request -> phone_2 ; $ contact -> phone_2_type = $ request -> phone_2_type ; $ contact -> companie_id = $ request -> companie_id ; $ contact -> notes = $ request -> notes ; $ contact -> save ( ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .