app/Http/Controllers/Admin/front/TeamController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Slide  $slide
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(EditRequest $request, $id)
    {
        if($request->imageFile){
            $image = basename($request->imageFile->store("public" , 'public'));
            $request['image'] = $image;
        }
        Team::find($id)->update($request->all());
        session()->flash("msg", "تم تحديثه ");
        return redirect(route("teams.index"));
    }
public function update ( EditRequest $ request , $ id ) { if ( $ request -> imageFile ) { $ image = basename ( $ request -> imageFile -> store ( " public " , 'public' ) ) ; $ request [ 'image' ] = $ image ; } Team :: find ( $ id ) -> update ( $ request -> all ( ) ) ; session ( ) -> flash ( " msg " , " تم تحديثه "); return redirect ( route ( " teams.index " ) ) ; }
Update the specified resource in storage.
Update the specified resource in storage .