app/Http/Controllers/Admin/ListBiograpyController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $oldImage = $request->input('oldImage');
        $title = $request->input('title');
        $sub_title = $request->input('sub_title');
        $image = $request->file('image');
        $list1 = $request->input('list1');
        $list2 = $request->input('list2');
        $list3 = $request->input('list3');
        $list4 = $request->input('list4');
        $desc = $request->input('desc');
        if ($logo === null && $pict === null) {
            Biograpy::find($id)->update([
                'bl_title' => $title,
                'bl_sub_title' => $sub_title,
                'bl_image' => $image,
                'bl_list1' => $list1,
                'bl_list2' => $list2,
                'bl_list3' => $list3,
                'bl_list4' => $list4,
                'bl_desc' => $desc,
            ]);
            return redirect()->to("adminpages/bannerlist");
        }
            Biograpy::find($id)->update([
                'bl_title' => $title,
                'bl_sub_title' => $sub_title,
                'bl_image' => $image,
                'bl_list1' => $list1,
                'bl_list2' => $list2,
                'bl_list3' => $list3,
                'bl_list4' => $list4,
                'bl_desc' => $desc,
            ]);
            return redirect()->to("adminpages/biograpylist");
    }
public function update ( Request $ request , $ id ) { $ oldImage = $ request -> input ( 'oldImage' ) ; $ title = $ request -> input ( 'title' ) ; $ sub_title = $ request -> input ( 'sub_title' ) ; $ image = $ request -> file ( 'image' ) ; $ list1 = $ request -> input ( 'list1' ) ; $ list2 = $ request -> input ( 'list2' ) ; $ list3 = $ request -> input ( 'list3' ) ; $ list4 = $ request -> input ( 'list4' ) ; $ desc = $ request -> input ( 'desc' ) ; if ( $ logo === null && $ pict === null ) { Biograpy :: find ( $ id ) -> update ( [ 'bl_title' => $ title , 'bl_sub_title' => $ sub_title , 'bl_image' => $ image , 'bl_list1' => $ list1 , 'bl_list2' => $ list2 , 'bl_list3' => $ list3 , 'bl_list4' => $ list4 , 'bl_desc' => $ desc , ] ) ; return redirect ( ) -> to ( " adminpages/bannerlist " ) ; } Biograpy :: find ( $ id ) -> update ( [ 'bl_title' => $ title , 'bl_sub_title' => $ sub_title , 'bl_image' => $ image , 'bl_list1' => $ list1 , 'bl_list2' => $ list2 , 'bl_list3' => $ list3 , 'bl_list4' => $ list4 , 'bl_desc' => $ desc , ] ) ; return redirect ( ) -> to ( " adminpages/biograpylist " ) ; }
Update the specified resource in storage.
Update the specified resource in storage .