1. Go to this page and download the library: Download zlt/laravel-notion-viewer 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/ */
'API_KEY' => env('NOTION_API_KEY'),
'API_VERSION' => env('NOTION_API_VERSION'), // default '2022-06-28'
'cache' => [
// If you want to cache the response, set this to true
'enabled' => false,
// specify cache time in seconds
'time' => 60,
]
use Zlt\LaravelNotionViewer\Notion\Client;
Client::getPage('page-id');
Client::getBlocks('block-id');
Client::getPageWithBlocks('page-id');
Client::getRecursiveBlocks('block-id');
Client::getPageWithRecursiveBlocks('page-id');
text
"illuminate/support": "^8.0|^9.0",
"php": "^8.1",
"illuminate/http": "^8.0|^9.0"