app/Http/Controllers/EntrepriseController.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 $req)
    {
        $id = Auth::user()->id;
        $raison = $req->input('raison_social');
        $adress = $req->input('adress');
        $tele = $req->input('telephone');
        $site = $req->input('site_web');
        $pays = $req->input('pays');
        $ville = $req->input('ville');
        $entreprise = new Entreprise;
        $entreprise->user_id = $id;
        $entreprise->raison_social = $raison;
        $entreprise->adress = $adress;
        $entreprise->telephone = $tele;
        $entreprise->site_web = $site;
        $entreprise->pays = $pays;
        $entreprise->ville = $ville;
        $entreprise->save();
        return redirect()->route('coordonnee');
    }
public function store ( Request $ req ) { $ id = Auth :: user ( ) -> id ; $ raison = $ req -> input ( 'raison_social' ) ; $ adress = $ req -> input ( 'adress' ) ; $ tele = $ req -> input ( 'telephone' ) ; $ site = $ req -> input ( 'site_web' ) ; $ pays = $ req -> input ( 'pays' ) ; $ ville = $ req -> input ( 'ville' ) ; $ entreprise = new Entreprise ; $ entreprise -> user_id = $ id ; $ entreprise -> raison_social = $ raison ; $ entreprise -> adress = $ adress ; $ entreprise -> telephone = $ tele ; $ entreprise -> site_web = $ site ; $ entreprise -> pays = $ pays ; $ entreprise -> ville = $ ville ; $ entreprise -> save ( ) ; return redirect ( ) -> route ( 'coordonnee' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .