Beachcasts /
airtable-sdk-php
| 1 | <?php |
||
| 2 | |||
| 3 | // example usage file |
||
| 4 | require_once('../vendor/autoload.php'); |
||
| 5 | |||
| 6 | use Beachcasts\Airtable\AirtableClient; |
||
| 7 | use Beachcasts\Airtable\Config; |
||
| 8 | |||
| 9 | Dotenv\Dotenv::createImmutable(__DIR__ . '/../')->load(); |
||
| 10 | |||
| 11 | $baseId = 'app87iLOq33mUgCFA'; |
||
| 12 | $tableName = 'Table 1'; |
||
| 13 | |||
| 14 | $airtableClient = new AirtableClient(Config::fromEnvironment(), $baseId); |
||
| 15 | |||
| 16 | $table = $airtableClient->getTable($tableName); |
||
| 17 | |||
| 18 | $id = 'recaoeoYmvW36NdMh'; |
||
| 19 | $content = $table->delete($id); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 20 | |||
| 21 | echo $content->getBody()->getContents(); |
||
| 22 |