Add Code in Your Controller.php File

 public function edit($builder)
    {
        $city=City::all();
        $builder=Builder::findOrFail($builder);
        return view('admin.builder.edit', compact('city', 'builder'));
    }

    public function update(Request $request, $builder)
    {
        $validator = Validator::make($request->all(), [
            'name'                 => 'required|unique:builders, bname|max:255',
            'slug'                  => 'required|unique:builders, bslug|max:100',
            // 'propertyImages'        => 'required|array|min:1',
            // 'propertyImages.*'      => 'required|image|mimes:jpeg,png,jpg,gif|max:1000000',

        ],[
            'name.required'=>'Builder Name is Required',
            'slug.required'=>'Builder Slug Should be Unique, This Name Already Exist in Our Database',
        ]);
        if ($validator->fails()){
            return response()->json(['status' =>0 , 'errors'=>$validator->messages()]);
        }else{

            $bld = Builder::findOrFail($builder);
            $chr  = substr($request->bname, 0, 1);
            if( $request->hasFile('bllogo')){ 

                $thums= $request->bllogo;
                $bllogo = uniqid($chr).'.'.$thums->getClientOriginalExtension();
                $img = Image::make($thums->getRealPath());
                $img->resize(300, null, function ($constraint) {
                    $constraint->aspectRatio();          
                });
                $thumbPath = public_path().'/builders_img/'.$bllogo;

                if (file_exists($thumbPath)) {
                    $this->removeImage($thumbPath);
                } 
                if(!empty($thumbPath)) {
   if (file_exists(public_path('builders_img/'.$thumbPath))) { // unlink or remove previous image from folder
       unlink(public_path('builders_img/'.$thumbPath));
   }
}

$img->save($thumbPath);
$optimizerChain = OptimizerChainFactory::create();
$optimizerChain->optimize($thumbPath);
$bllogoimg = $bllogo;

}else{
    $bllogoimg = NULL;
}
$bld->name =$request->bname;
$bld->slug =$request->bslug;
$bld->title =$request->metatitle;
$bld->short_desc =$request->metadesc;
$bld->meta_desc =$request->metadesc;
$bld->keyword =$request->metakeyword;
$bld->bldlogo =$bllogoimg;
$bld->save();
return response()->json(['status'=>1], 201);
}
}

 

Now Create a new View File: edit.blade.php

Add this html code there…

<div class="row">
  <div class="col-sm-12">
    <form class="form-horizontal" id="builderForm" method="post" action="{{route('builders.update',['builder'=>$builder->blId])}}" enctype="multipart/form-data">
      @csrf
      @method('PUT')
      <div class="panel-group" id="accordion">
        <div class="panel panel-default-light">
          <div class="panel-heading">
            <div class="panel-title">
              <a href="#collapseOne" class="block" data-toggle="collapse" data-parent="#accordion" aria-expanded="true">
                Builder Section
              </a>
            </div>
          </div><!-- /.panel-heading -->

          <div class="panel-collapse collapse in" id="collapseOne">
            <div class="panel-body">
              
            <!-- 	<div class="form-group m-bottom-10">
                <label for="title" class="control-label col-sm-3">Select City: <span class="text-danger">*</span></label>
                <div class="col-sm-9">
                  <select class="form-control" name="city[]" id="city" style="width: 100%;" multiple="">
                    <option value="0">Select City</option>
                    @forelse($city as $ct)
                    <option value="{{$ct->ctId}}">{{$ct->name}}</option>
                    @empty
                    @endforelse
                  </select>
                </div>
              </div> --><!-- /.form-group -->
              <div class="form-group m-bottom-10">
                <label for="location" class="control-label col-sm-3">Builder Name: <span class="text-danger">*</span></label>
                <div class="col-sm-9">
                  <input type="text" class="form-control" id="bname" name="bname" value="{{$builder->name}}" placeholder="Enter Builder">
                  <div id="bname-error" class="help-block"></div>
                </div>
              </div><!-- /.form-group -->
              <div class="form-group m-bottom-10">
                <label for="slug" class="control-label col-sm-3">Builder Slug: <span class="text-danger">*</span></label>
                <div class="col-sm-9">
                  <input type="text" class="form-control" id="bslug" name="bslug" value="{{$builder->slug}}" placeholder="Enter Slug">
                  <div id="bslug-error" class="help-block"></div>
                </div>
              </div><!-- /.form-group -->
              <div class="form-group m-bottom-10">
                <label for="metatitle" class="control-label col-sm-3">Title: <span class="text-danger">*</span></label>
                <div class="col-sm-9">
                  <input type="text" class="form-control" id="metatitle" value="{{$builder->title}}" name="metatitle"placeholder="Enter Title">
                </div>
              </div><!-- /.form-group -->
              <div class="form-group m-bottom-10">
                <label for="metadesc" class="control-label col-sm-3">Description: <span class="text-danger">*</span></label>
                <div class="col-sm-9">
                  <textarea class="form-control" rows="6" name="metadesc" autocomplete="off" id="metadesc" placeholder="Meta Description">{{$builder->meta_desc}}</textarea>
                </div>
              </div><!-- /.form-group -->
              <div class="form-group m-bottom-10">
                <label for="location" class="control-label col-sm-3">Keywords: <span class="text-danger">*</span></label>
                <div class="col-sm-9">
                  <input type="text" data-role="tagsinput" class="form-control" id="metakeyword" name="metakeyword" placeholder="Enter Keywords" value="{{$builder->keyword}}">
                </div>
              </div><!-- /.form-group -->
              <div class="form-group m-bottom-10">
                <label for="location" class="control-label col-sm-3">Builder Logo: <span class="text-danger">*</span></label>
                <div class="col-sm-9">
                  @if ("builders_img/{{ $builder->bldlogo }}")
                  <img src="{{ asset('builders_img/'.$builder->bldlogo) }}">
                  @else
                  aaa
                  @endif
                  <input type="file" name="bllogo" id="bllogo" value="{{$builder->bldlogo}}">
                </div>
              </div><!-- /.form-group -->
            </div>
          </div><!-- /.panel-collapse -->
        </div><!-- /.panel -->

      </div><!-- /.panel -->
      

      <div class="form-group">
        <div class="col-sm-12 text-right">
          
          <input type="submit" name="submit">
          
        </div><!-- /.col-sm-12 -->
      </div><!-- /.form-group -->
    </form><!-- /.form-horizontal -->
  </div><!-- /.col-sm-12 -->
</div><!-- /.row -->