Download the PHP package fiveam-code/laravel-notion-api without Composer

On this page you can find all versions of the php package fiveam-code/laravel-notion-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-notion-api

Notion for Laravel

Notion For Laravel [![Run tests](https://github.com/5am-code/laravel-notion-api/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/5am-code/laravel-notion-api/actions/workflows/main.yml) [![Latest Version on Packagist](https://img.shields.io/packagist/v/fiveam-code/laravel-notion-api.svg?style=flat-square)](https://packagist.org/packages/fiveam-code/laravel-notion-api) [![Total Downloads](https://img.shields.io/packagist/dt/fiveam-code/laravel-notion-api.svg?style=flat-square)](https://packagist.org/packages/fiveam-code/laravel-notion-api) [comment]: <> (![GitHub Actions](https://github.com/fiveam-code/laravel-notion-api/actions/workflows/main.yml/badge.svg))

This package provides a simple and crisp way to access the Notion API endpoints, query data and update existing entries.

Documentation

For a extensive documentation, more context and usage examples, head over to the official documentation at notionforlaravel.com.

Quick Start Guide

All examples refer to our test database, which you can find here.

Installation

The package is compatible with Laravel 8, 9 and 10. The minimum PHP requirement is 8.0.

  1. Install the package via composer:

  2. Get your Notion API access token like explained in their documentation. It's also important to grant access to the integration within your Notion pages, which is described in the developer documentation at Notion as well.

  3. Add a new line to your applications .env file:

  4. You're ready to go! You can now access Notion endpoints through the Notion facade:

    That's it.

For detailed usage information and a list of available endpoints see (the docs).

Examples

Fetch a Notion Database

The databases()->find() method returns a FiveamCode\LaravelNotionApi\Entities\Database object, which contains all the information about the database, including its properties and the possible values for each property.

Fetch a Notion Page

The pages()->find() method returns a FiveamCode\LaravelNotionApi\Entities\Page object, which contains all the information about the page, including its properties and the possible values for each property.

Search

The search() endpoint returns a collection of pages that match the search query. The scope of the search is limited to the workspace that the integration is installed in and the pages that are shared with the integration.

Query Database

The database() endpoint allows you to query a specific database and returns a collection of pages (= database entries). You can filter and sort the results and limit the number of returned entries. For detailed information about the available filters and sorts, please refer to the documentation.

Compound filters for AND or OR queries are also available:

Tests

You can find even more usage examples by checking out the package tests in the /tests directory. We are using Pest for out tests and are currently in the process of switching all existing PHPUnit tests to Pest.

If you want to run the tests in your CLI:

Support

Supported by Tinkerwell

Tinkerwell

The development of this package is supported by Tinkerwell.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-notion-api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.0.1
illuminate/support Version ^8.0|^9.0|^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fiveam-code/laravel-notion-api contains the following files

Loading the files please wait ....