REBELinBLUE\Deployer\Repositories\EloquentRepository::updateById PHP Méthode

updateById() public méthode

Updates an instance by it's ID.
public updateById ( array $fields, integer $model_id ) : Model
$fields array
$model_id integer
Résultat Illuminate\Database\Eloquent\Model
    public function updateById(array $fields, $model_id)
    {
        $model = $this->getById($model_id);
        $model->update($fields);
        return $model;
    }