PHPackages                             elsayed85/notion - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. elsayed85/notion

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

elsayed85/notion
================

This is my package Notion

1.0(5y ago)111MITPHPPHP ^7.4|^8.0

Since May 14Pushed 5y agoCompare

[ Source](https://github.com/elsayed85/notion)[ Packagist](https://packagist.org/packages/elsayed85/notion)[ Docs](https://github.com/elsayed85/notion)[ GitHub Sponsors](https://github.com/elsayed85)[ RSS](/packages/elsayed85-notion/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

This is my package For Notion Api
=================================

[](#this-is-my-package-for-notion-api)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require elsayed85/notion
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Elsayed85\Notion\NotionServiceProvider" --tag="notion-config"
```

This is the contents of the published config file:

```
return [
    "base" => "https://api.notion.com",
    'version' => '2021-05-13'
];
```

Add Notion Api To your env

in config/services.php

```
'notion' => [
        'client_id' => env('NOTION_CLIENT_ID'),
        'client_secret' => env('NOTION_CLIENT_SECRET'),
        'token' => env('NOTION_TOKEN')
]

```

in .env add

```
# for public
NOTION_CLIENT_ID=
NOTION_CLIENT_SECRET=

# for internal
NOTION_TOKEN=

```

Usage
-----

[](#usage)

```
$notion = new Elsayed85\Internal\Notion();

$start_cursor = null;
$page_size = 20;

// https://developers.notion.com/reference/get-databases
$notion->databases($start_cursor , $page_size);

// https://developers.notion.com/reference/post-database-query
$notion->queryDatabase("2f611956-c64b-4588-ab64-2f013ac42527");

// https://developers.notion.com/reference/get-database
$notion->database("2f611956-c64b-4588-ab64-2f013ac42527");

// https://developers.notion.com/reference/get-users
$notion->users();

// https://developers.notion.com/reference/get-user
 $notion->user("73e41e87-0ae2-4ef0-bd21-a9d352c07a47");

 // https://developers.notion.com/reference/post-search
 $notion->search("hassan", 'last_edited_time');

// https://developers.notion.com/reference/get-page
 $notion->page("cdd93f5f-1626-4388-9a02-78779663a3aa")

// https://developers.notion.com/reference/post-page
 $notion->createPage(
        "2f611956-c64b-4588-ab64-2f013ac42527",
        "database_id",
        [
            'Name' => [
                'title' => [
                    0 => [
                        'text' => [
                            'content' => 'Tuscan Kale',
                        ],
                    ],
                ],
            ],
            'Email' => [
                'email' => "test@gmail.com",
            ],
        ],
        [
            0 => [
                'object' => 'block',
                'type' => 'heading_2',
                'heading_2' => [
                    'text' => [
                        0 => [
                            'type' => 'text',
                            'text' => [
                                'content' => 'Lacinato kale',
                            ],
                        ],
                    ],
                ],
            ],
            1 => [
                'object' => 'block',
                'type' => 'paragraph',
                'paragraph' => [
                    'text' => [
                        0 => [
                            'type' => 'text',
                            'text' => [
                                'content' => 'Lacinato kale is a variety of kale with a long tradition in Italian cuisine, especially that of Tuscany. It is also known as Tuscan kale, Italian kale, dinosaur kale, kale, flat back kale, palm tree kale, or black Tuscan palm.',
                                'link' => [
                                    'url' => 'https://en.wikipedia.org/wiki/Lacinato_kale',
                                ],
                            ],
                        ],
                    ],
                ],
            ],
        ]
    );

// https://developers.notion.com/reference/patch-page
     $notion->updatePage(
        "cdd93f5f-1626-4388-9a02-78779663a3aa",
        [
            'Name' => [
                'title' => [
                    0 => [
                        'text' => [
                            'content' => 'Tuscan Kale',
                        ],
                    ],
                ],
            ],
            'Email' => [
                'email' => "test@gmail.com",
            ],
        ],
        [
            0 => [
                'object' => 'block',
                'type' => 'heading_2',
                'heading_2' => [
                    'text' => [
                        0 => [
                            'type' => 'text',
                            'text' => [
                                'content' => 'Lacinato kale',
                            ],
                        ],
                    ],
                ],
            ],
            1 => [
                'object' => 'block',
                'type' => 'paragraph',
                'paragraph' => [
                    'text' => [
                        0 => [
                            'type' => 'text',
                            'text' => [
                                'content' => 'Lacinato kale is a variety of kale with a long tradition in Italian cuisine, especially that of Tuscany. It is also known as Tuscan kale, Italian kale, dinosaur kale, kale, flat back kale, palm tree kale, or black Tuscan palm.',
                                'link' => [
                                    'url' => 'https://en.wikipedia.org/wiki/Lacinato_kale',
                                ],
                            ],
                        ],
                    ],
                ],
            ],
        ]
    );
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [elsayed85](https://github.com/elsayed85)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1876d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9f6465ef2e90074d5a323bf893bb1ab9a7b5af7bf61d1001f85a8448d8fb257d?d=identicon)[elsayed851999](/maintainers/elsayed851999)

---

Top Contributors

[![elsayed85](https://avatars.githubusercontent.com/u/41492621?v=4)](https://github.com/elsayed85 "elsayed85 (1 commits)")

---

Tags

laravelnotionelsayed85

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/elsayed85-notion/health.svg)

```
[![Health](https://phpackages.com/badges/elsayed85-notion/health.svg)](https://phpackages.com/packages/elsayed85-notion)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
