Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.

15 St Margarets, NY 10033
(+381) 11 123 4567



Notion API for Laravel | Laravel News

Notion API for Laravel is a package to effortlessly create Notion integrations with Laravel:

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

The package includes convenient methods to fetch page information, search Notion collection pages and databases in your workspace:

  • Fetch a Notion page
  • Fetch children from a specific block
  • Search all databases and pages
  • Get all pages in a workspace
  • Fetch all databases of a workspace

Here’s some usage examples from the API documentation:

// Returns a specific page

// Returns all pages of the workspace

// Returns all databases of the workspace

// Fetches all users from this workspace
        ->limit(5) // limit is optional

// Retrieves data for a specific user in this workspace

More specifically, here are some examples of retrieving properties from a specific page:

// Access properties from a specific page
$page = Notion::pages()   

// Returns all properties as collection

// Returns specific property by propertyKey

// Returns specific property content by propertyKey (returned type depends on the property-type)

// Returns specific property content by propertyKey (array of exact NotionApi-structure is returned)

// Returns array of propertyKeys (names/titles of properties)

// Return json-array of all properties

Learn More

You can see the source code, get installation instructions, and get installation instructions on GitHub at 5am-code/laravel-notion-api. The official documentation has more code examples and usage details. You can learn more about the Notion API at developers.notion.com.

Credit: Source link

Previous Next
Test Caption
Test Description goes like this