laravel forcefill

145

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;
 }

laravel forcefill -

Model::where('id', $id)->forceFill($data)->save();

Comments

Submit
0 Comments