Examples

{info} If you have any questions or feedback,
feel free to @ someone of the team on Twitter, create an issue or open a pull request yourself! 😊

Connection setup

Access through Facade

Access Token has to be set in .env, see Installation for details.

\Notion::databases()->find($databaseId);

Custom instantiation

Necessary if you access more than one Notion integration.

use FiveamCode\LaravelNotionApi\Notion;

$notion = new Notion($apiToken, $apiVersion); // version-default is 'v1'
$notion->databases()->find($databaseId);

Detailed examples

Create and Update Pages

✨ Create Page
✨ Update Page
✨ Create Blocks

Fetch Data

✨ Pages
✨ Blocks
✨ Search
✨ Database
✨ Databases
✨ Properties
✨ Users