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. elsayed85/notion

ActiveLibrary

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 1mo ago

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 37% 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

1829d 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

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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