flutterbuddy1/easy-api
最新稳定版本:v1.1.3
Composer 安装命令:
composer require flutterbuddy1/easy-api
包简介
Easy Way to integrate API in you laravel application.
README 文档
README
Easy Way to integrate API in you laravel application.
Installation Guide
Install Package using Composer.
composer require flutterbuddy1/easy-api
Paste the code below given.
Use this to your route/api.php
use Flutterbuddy1\EasyApi\EasyApi;
And add this inside you api middleware in route/api.php
EasyApi::api();
That's It your API's is ready to go 🚀
API's Docs
Get Data API
Send GET Request in this api.
http://YOUR_APPLICATION_URL/api/{TABLE_NAME}
Example:
http://localhost:8000/api/posts
- Include Table
http://YOUR_APPLICATION_URL/api/{TABLE_NAME}?include={OTHER_TABLE_NAME}
Example:
http://localhost:8000/api/posts?include=categories,users
Get Data By Id API
Send GET Request in this api.
http://YOUR_APPLICATION_URL/api/{TABLE_NAME}/{ID}
Example:
http://localhost:8000/api/posts/3
- Include Table
http://YOUR_APPLICATION_URL/api/{TABLE_NAME}/{ID}?include={OTHER_TABLE_NAME}
Example:
http://localhost:8000/api/posts/3?include=categories,users
Post Data API
Send POST Request in this api.
http://YOUR_APPLICATION_URL/api/{TABLE_NAME}
Example:
http://localhost:8000/api/posts
Post Data in JSON :
{
"title:"Some Title",
"content":"Some Content",
"category":"YOUR CATEGORY ID",
"user":"YOUR USER ID",
}
Update Data API
Send PUT Request in this api.
http://YOUR_APPLICATION_URL/api/update/{TABLE_NAME}
Example:
http://localhost:8000/api/update/posts
Post Data in JSON :
{
"title:"UPDATED TITLE",
"content":"UPDATED CONTENT",
}
Delete Data API
Send DELETE Request in this api.
http://YOUR_APPLICATION_URL/api/delete/{TABLE_NAME}/{ID}
Example: :
http://localhost:8000/api/delete/posts/3
Contribute for Adding New Features
Created With ♥ By FlutterBuddy
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-31