Skip to content

Commit 67f9d36

Browse files
committed
allow to set notion api-token by env
1 parent 104ced0 commit 67f9d36

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

config/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
* You can place your custom package configuration in here.
55
*/
66
return [
7-
7+
'notion-api-token' => env('NOTION_API_TOKEN', '')
88
];

src/Notion.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ public function __construct(string $version = null, string $token = null)
3131
if ($token !== null) {
3232
$this->setToken($token);
3333
}
34+
else{
35+
$this->setToken(config('laravel-notion-api.notion-api-token'));
36+
}
3437

3538
$this->endpoint = new Endpoint($this);
3639

0 commit comments

Comments
 (0)