API application template for Yii 3.
Install docker:
docker-compose up -d
Enter into the container:
docker exec -it yii-php bash
Install packages:
composer install
Usually the application is available at http://localhost:8080.
Method | Requires auth | Description |
---|---|---|
GET / | no | get application info |
GET /blog/ | no | get blog records |
GET /blog/[id] | no | get blog record |
POST /blog/ | yes | create blog record |
PUT /blog/[id] | yes | update blog record |
GET /users/ | yes | get users |
GET /users/[id] | yes | get user |
POST /auth/ | no | auth |
Authorization is performed via the X-Api-Key
header.
./vendor/bin/codecept run
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalm