app/Http/Controllers/HeaderController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Header  $header
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $img = Storage::disk("public")->put("", $request->file('img'));
        $logo = Storage::disk("public")->put("", $request->file('logo'));
        $img2 = Storage::disk("public")->put("", $request->file('img2'));
        $header = Header::find($id);
        $header->logo=$logo;
        $header->img=$img;
        $header->img2=$img2;
        $header->paragraphe=$request->input("paragraphe");
        $header->save();
        return redirect()->back();
    }
public function update ( Request $ request , $ id ) { $ img = Storage :: disk ( " public " ) -> put ( " " , $ request -> file ( 'img' ) ) ; $ logo = Storage :: disk ( " public " ) -> put ( " " , $ request -> file ( 'logo' ) ) ; $ img2 = Storage :: disk ( " public " ) -> put ( " " , $ request -> file ( 'img2' ) ) ; $ header = Header :: find ( $ id ) ; $ header -> logo = $ logo ; $ header -> img = $ img ; $ header -> img2 = $ img2 ; $ header -> paragraphe = $ request -> input ( " paragraphe " ) ; $ header -> save ( ) ; return redirect ( ) -> back ( ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
//