A simple approach to interacting with Airtables.
You can install the package via composer:
composer require tapp/laravel-airtable
Publish the config file:
php artisan vendor:publish --provider="Tapp\Airtable\AirtableServiceProvider"
Define airtables account information in .env:
AIRTABLE_KEY=
AIRTABLE_BASE=
AIRTABLE_TABLE=
AIRTABLE_KEY
can be retrieved here: https://airtable.com/accountAIRTABLE_BASE
can be found here: https://airtable.com/api, select base then copy from URL:https://airtable.com/[Base Is Here]/api/docs#curl/introduction
AIRTABLE_TABLE
can be found in the docs for the appropriate base, this is not case senstive. IE:tasks
Airtable::table('tasks')->get();
Airtable::find('id_string');
Airtable::where('name', 'myName')->get();
- First argument will be used for finding existing
- Second argument is additional data to save if no results are found and we are creating (will not be saved used if item already exists)
Airtable::firstOrCreate(['name' => 'myName'], ['field' => 'myField']);
- First argument will be used to find existing
- Second argument is additional data to save when we create or update
Airtable::createOrUpdate(['name' => 'myName'], ['field' => 'myField']);
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email steve@tappnetwork.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.