PHP code example of tapp / laravel-airtable

1. Go to this page and download the library: Download tapp/laravel-airtable library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tapp / laravel-airtable example snippets


use Airtable;

Airtable::orderBy('id')->orderBy('created_at', 'desc')->get();
bash
php artisan vendor:publish --provider="Tapp\Airtable\AirtableServiceProvider"
 php
Airtable::table('tasks')->get();
 php
Airtable::table('tasks')->all();
Airtable::table('tasks')->all(500000); // 0.5 seconds
 php
Airtable::addParam('returnFieldsByFieldId', true); // one param at a time
Airtable::params(['returnFieldsByFieldId' => true, 'view' => 'My View']) // multiple params at once
 php
Airtable::create(['name' => 'myName']);
 php
Airtable::table('companies')->update('rec5N7fr8GhDtdNxx', [ 'name' => 'Google', 'country' => 'US']);
 php
Airtable::table('companies')->patch('rec5N7fr8GhDtdNxx', ['country' => 'US']);
 php
Airtable::table('companies')->patch([
    [
        'id' => 'rec5N7fr8GhDtdNxx',
        'fields' => ['country' => 'US']
    ],
    [
        'id' => 'rec8BhDt4fs2',
        'fields' => ['country' => 'UK']
    ],
    ...
]);
 php
Airtable::table('companies')->destroy('rec5N7fr8GhDtdNxx');