asif/table-to-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

asif/table-to-api

最新稳定版本:1.0.1

Composer 安装命令:

composer require asif/table-to-api

包简介

a laravel package that creates rest api for a certain table. It generates scaffolding for rest api

README 文档

README

table2api is a laravel package that creates rest api for a certain table. It generates scaffolding for rest api.

  • It generates controller,model,request and route for a certain table to work like rest api

Installing table-to-api

The recommended way to install table-to-api is through Composer.

composer require asifzcpe/table-to-api

Setting up the package in laravel project

  1. Run following artisan command shipped with this package
php artisan table2api:generate YOUR_TABLE_NAME

if table exists in database it generates following scaffolding:

Image of table-to-api

  1. Inserting api namespace in composer.json file like the following:
 "psr-4": {
     "App\\": "app/",
     "Api\\V1\\":"api/v1/"
  },
  1. Run following command to autoload
composer dumpautoload
php artisan cache:clear
php artisan clear-compiled
  1. Run following command to see generated api routes
  php artisan route:list

and it will show like this (users table in my case) Image of route lists

It is done. Now, you can hit the urls to get json data as rest api

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固