ahmedosama/php-api
最新稳定版本:v1.1.0
Composer 安装命令:
composer create-project ahmedosama/php-api
包简介
Make an API for your application using PHP
README 文档
README
- This is a simple php-api project to make an API for your application using PHP native.
REQUIRMENTS
- PHP v8.0 or higher.
- composer
Download and install
git clone https://github.com/ahmed-osama2022/php-api
cd php-api
composer install
- Then serve the public folder
# if you're using php-cli
php -S localhost:8000 -t public
example of .env file
- You should put your
.envfile at the root folder in the project.
DB_HOST= DB_NAME= DB_PORT= DB_USER= DB_PASS=
Check if it is working fine
-
If you start serving the project you should see this welcome page at your serving link.
How to work with?
NOTE: This library uses MVC in the structure.
NOTE: This project uses psr-4 autoloader for the src and App folder.
-
Put all your credentials for the database in the
.envfile. -
Define all your routes as explained in the
src/Router.phpfile. -
You will see an example in the files to tell you How to use it fine.
-
Start making the logic of your application as contrllers you defined in the
App/controllersfolder.
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-21

