restjs / rest-api
Create Rest API Application
v2.0.0
2025-01-14 04:31 UTC
Requires
- php: 7.1.*|7.2.*|7.3.*|7.4.*|8.0.*|8.1.*
- restjs/php-rest-api: ^2.0
This package is auto-updated.
Last update: 2025-03-14 04:46:03 UTC
README
Installation
Run the Composer command to install the latest stable version of RestJS:
composer create-project restjs/rest-api
Getting Started
- Create new Database with
mongodb
. - Configure database variables in .env:
DATABASE_HOST = ''
DATABASE_NAME = ''
ACCESS_TOKEN = ''
Used Feature
json
,headers_authorization
,upload_file
,access_token
Quick links
- Get API for
GET
,POST
,PUT
,DELETE
- Upload File for
POST
,DELETE
API Routes
HTTP Method | Path | Action | Scope | Desciption |
---|---|---|---|---|
GET | /<collection_name> | index | document:list | Get all document |
POST | /<collection_name> | store | document:create | Create an document |
GET | /<collection_name>/{_id} | show | document:read | Fetch an document by id |
PUT | /<collection_name>/{_id} | update | document:write | Update an document by id |
DELETE | /<collection_name>/{_id} | destroy | document:delete | Delete an document by id |