承接 sectoroverload2k/rest-router 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

sectoroverload2k/rest-router

最新稳定版本:1.1.4

Composer 安装命令:

composer require sectoroverload2k/rest-router

包简介

PHP Library for REST API

关键字:

README 文档

README

This code provides the basic framework for a PHP developer that wants to build a REST service. Some of the features provided in this framework are:

  • API Authentication
  • Multiple request methods
    • GET
    • POST
    • PUT
    • DELETE
  • Custom URL routing to support variables

Controller Versions, Classes and Actions

/controllers/version/controller/action Example Request: GET /v1/home/index

  • Default version is v1
  • Default controller class is home
  • Default action is index

##The REST Router will do the following:

  • try to find a folder called v1 in the /controllers folder.
  • Load home controller in file /controllers/v1/home.php
  • Because this is a GET request, it will try to following:
    • check for a class method called get_index and run it
    • if not found, it will search for index and run it
    • if not found, it will return an error

Request Methods

  • GET
  • POST
  • PUT
  • DELETE

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-11