TappNetwork/laravel-airtable

[New feature] PatchOrCreate - to create or update (without destructing)

Opened this issue · 0 comments

Airtable::table('default')->updateOrCreate(['Email' => 'johndoe@gmail.com'], ['Address' => 'Calle 13']);
is very useful to check if some record exists to update it, and if not create it.

The problem is that it deletes the rest of the column values, so Is not convenient in some scenarios.

To work around this I do need to find the Airtable id using ->where() method and use the patch method.

Would be appreciated a PatchOrCreate method