REST API for Flutter Auction App using Codeigniter 4
- Composer
- PHP 8.1+ & MySQL or XAMPP with
-intl
extension enable
- Rename
.env.example
file to.env
. - Set the jwt secretkey and token expiration in the
.env
file if you want to change them. - Install dependencies:
composer install
- Create
db_online_auction
database - Ensure your database is setup correctly, then run the migrations:
php spark migrate -all
- Run the app:
php spark serve
POST /api/login
Parameter | Type | Description |
---|---|---|
username |
string |
Required. Your username |
password |
string |
Required. Your password |
POST /api/users
Parameter | Type | Description |
---|---|---|
username |
string |
Required. |
password |
string |
Required. |
name |
string |
Required. |
email |
string |
Required. |
phone |
string |
Warning
GET /api/auctions
GET /api/auctions/{id}
GET /api/users/auctions
GET /api/auctions/{id}/bids
POST /api/auctions
PATCH /api/auctions/{id}
PATCH /api/auctions/{id}/winner
PATCH /api/auctions/{id}/close
DELETE /api/auctions/{id}
GET /api/bids
GET /api/bids/{id}
GET /api/users/bids
POST /api/bids
PATCH /api/bids/{id}
DELETE /api/bids/{id}
GET /api/items
GET /api/items/{id}
POST /api/items
PATCH /api/items/{id}
DELETE /api/items{id}
GET /api/users
GET /api/users/{id}
PATCH /api/users/{id}
DELETE /api/users/{id}
Still need more improvement
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.