Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Course - PHP & Notion API

👋 hello

Welcome to the companion repository for the course "WebDon at HEIG-VD"! This course is designed to explain & showcase how to use the Notion API with PHP on the Webmardi database.

🛠 Requirements

  • PHP
  • Composer

👾 Samples

🧨 Getting Started

All samples are easily testable in your browser by running the php built-in web server.

php -S localhost:9000 -t samples/

And then browsing to the host and port you specified (in the above example, http://localhost:9000).

🚧 How to run the examples

  1. Install the dependencies with Composer:
$ composer install
  1. Copy the .env.example file in the examples folder as .env
$ cp ./.env.example ./.env
  1. Fill the .env file with correct information

    • NOTION_WEBMARDI_DATABASE_ID a Notion database
    • NOTION_TOKEN a valid notion Token for the previous Database
  2. Run the PHP built-in web server. Supply the -t option to this directory:

$ php -S localhost:9000 -t ./

About

Companion & Code Sample of PHP code with the Notion API

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages