CristalTeam / php-api-wrapper

:rainbow: Work with APIs like with Laravel Eloquent or Doctrine (no longer a dream)
MIT License
117 stars 32 forks source link

Example update #38

Open jorbascrumps opened 2 years ago

jorbascrumps commented 2 years ago

I'm not sure how updating is suppose to work. Normally to update a model with Eloquent you would do something like:

Customer::where('id', 1)->update([
    // ...
]);

However, this doesn't appear to be working and results in the following error:

{
    "message": "Call to a member function update() on array",
    "exception": "Exception",
    "file": "/vendor/cristal/php-api-wrapper/src/Builder.php",
    "line": 241
}

Is there a correct way to update or is this a bug?