REBELinBLUE\Deployer\Repositories\EloquentUserRepository::updateById PHP Метод

updateById() публичный Метод

public updateById ( array $fields, $model_id )
$fields array
    public function updateById(array $fields, $model_id)
    {
        $user = $this->getById($model_id);
        if (array_key_exists('password', $fields)) {
            if (empty($fields['password'])) {
                unset($fields['password']);
            } else {
                $fields['password'] = bcrypt($fields['password']);
            }
        }
        $user->update($fields);
        return $user;
    }