承接 staskjs/laravel-rest 相关项目开发

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

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

staskjs/laravel-rest

Composer 安装命令:

composer require staskjs/laravel-rest

包简介

All you need to quickly create REST controllers

README 文档

README

Why?

Everytime projects need a REST api to work with, it finished with lots of duplicate code all over the place and what is worse, in multiple projects.

So to handle this problem, this repository was created.

For now it contains only one controller from which you can extend to get all those standard REST functions.

Controller is highly customizible by overriding some functions.

Please refer to source code to see what you can do.

Installation

composer require staskjs/laravel-rest

Then register service provider in config/app.php:

Staskjs\Rest\RestServiceProvider::class

Then just extend your controller from \Staskjs\Rest\RestController, register resource route (Route::resource) pointing to your controller and you are good to go!

Usage

You can add Form Request Validation to every request there is.

Simple override these parameters with class to use.

protected $storeRequest = ModelStoreRequest::class;

// Same with other requests, if needed

For simpler approach to validation, override rules method to return array of validation rules.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-03-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固