Answers for "laravel forcefill"

PHP
1

laravel forcefill

/**
  * Update and return record.
  *
  * @param Model $record
  * @param array $data
  *
  * @return Model
  */
 public function update(Model $record, $data = [])
 {
     $record->forceFill($data)->save();
     return $record;
 }
Posted by: Guest on June-16-2021
1

laravel forcefill

Model::where('id', $id)->forceFill($data)->save();
Posted by: Guest on June-16-2021

Browse Popular Code Answers by Language