PHP code example of jensvandewiel / laravel-notion-api
1. Go to this page and download the library: Download jensvandewiel/laravel-notion-api 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/ */
jensvandewiel / laravel-notion-api example snippets
use Jensvandewiel\LaravelNotionApi\Notion;
$notion = new Notion(env('NOTION_API_TOKEN'));
use Notion;
Notion::pages()->find('page_id');
$page = Notion::pages()->find('page_id');
$page = new Page();
$page->setTitle('Name', 'My New Page');
$page->setText('Description', 'This is a description');
$createdPage = Notion::pages()->createInDatabase('database_id', $page);
$page = new Page();
$page->setTitle('Name', 'My New Page');
$createdPage = Notion::pages()->createInPage('parent_page_id', $page);