Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bran921007 opened this issue Mar 18, 2021 · 0 comments

Comments

@bran921007
Copy link

bran921007 commented Mar 18, 2021

Airtable::table('default')->updateOrCreate(['Email' => '[email protected]'], ['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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant