定制 hvent90/api-inspector 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

hvent90/api-inspector

最新稳定版本:1.0.6

Composer 安装命令:

composer require hvent90/api-inspector

包简介

Streams API requests

README 文档

README

Table of Contents

In a Nutshell

- Install the package.

- Navigate with your browser to /api/inspect.

- You will now see HTTP requests being made to your application in real time. You do not need to refresh the browser.

Okay, that was the elevator shpiel. Here is the walkthrough of what is happening:

Hvent90/ApiInspector/ApiInspectorServiceProvider::boot() intercepts the $request object with $this->app[‘router’]->before([$this, ‘onBefore’]);.

Hvent90/ApiInspector/ApiInspectorServiceProvider::onBefore($request) takes the $request object and, after instantiating Pusher, uses Pusher to feed the data directly to hvent90/api-inspector/src/Http/views/stream.blade.php.

Installation

  • Add this package to your Laravel project by typing composer require hvent90/api-inspector in your command line.
  • Add 'Hvent90\ApiInspector\ApiInspectorServiceProvider' to the Providers array in config/app.php.
  • Publish the views and configuration file for easy modifications by typing php artisan vendor:publish in your command line. What does this do?
  • Enter in your Pusher access keys in config/api-inspector.php.

Default Usage

The URI endpoint of api/inspect will now load a view that streams all API requests in real time without refreshing the browser. Enjoy!

Configuration

You can configure the behavior of ApiInspector via config/api-inspector.php.

  • active accepts either true or false and will enable or disable ApiInspector
  • public, secret, and app_id take your Pusher keys
  • uri will determine what URI endpoint is associated with the route
  • prefix will add a prefix to the route
  • subdomain will add a subdomain to the route
  • middleware adds middleware to the route

The array called route-modifiers is directly injected in to a route group that governs the API Inspector's route. You can add custom key/value pairs to the route-modifiers array to suite your application's needs.

You can locate and customize the default views found in resources/views/vendors/hvent90/api-inspector.

Pusher Info

Visit https://pusher.com for more information on the Pusher service. It is quick, easy, and awesome. My implementation of Pusher in this package can be understood through Jeffrey Wayes' (of Laracasts.com) great video tutorial great video tutorial

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固