matthewbdaly/laravel-internal-requests 问题修复 & 功能扩展

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

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

matthewbdaly/laravel-internal-requests

最新稳定版本:0.0.2

Composer 安装命令:

composer require matthewbdaly/laravel-internal-requests

包简介

Make internal requests with your Laravel app

README 文档

README

Build Status Coverage Status

Make internal requests against your Laravel application.

Installation

composer require matthewbdaly/laravel-internal-requests

What do I want this for?

I've used this approach for a mobile app that had offline functionality. Every time it made a change to some data, it needed to be able to store the changes locally. Then, when the app was online again, it needed to send the changes up in a batch so that they could be synced. I created a sync endpoint that used something like this to loop through every request in the batch and process it all in one go. If one failed, I could then catch the exception and persist the unsynced changes in a table in the database so that they could be resolved later without losing the data.

I honestly can't think of any other situation where you'd want to use this approach, but someone else may.

Usage

Type-hint the interface Matthewbdaly\LaravelInternalRequests\Contracts\Services\MakesInternalRequests to retrieve the internal request service. Then use it as follows:

$service->request('POST', '/api/resource', ['content' => 'blah']);

Any one request accepts three arguments:

  • The HTTP verb to use
  • The route to hit
  • The payload (optional)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固