Package Data | |
---|---|
Maintainer Username: | hvent90 |
Maintainer Contact: | hvent90@gmail.com (Henry Ventura) |
Package Create Date: | 2015-04-29 |
Package Last Update: | 2015-04-29 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-18 03:04:40 |
Package Statistics | |
---|---|
Total Downloads: | 50 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
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
.
composer require hvent90/api-inspector
in your command line.'Hvent90\ApiInspector\ApiInspectorServiceProvider'
to the Providers array in config/app.php
.views
and configuration file
for easy modifications by typing php artisan vendor:publish
in your command line. What does this do?
config/api-inspector.php
.The URI endpoint of api/inspect
will now load a view that streams all API requests in real time without refreshing the browser. Enjoy!
You can configure the behavior of ApiInspector via config/api-inspector.php
.
active
accepts either true
or false
and will enable or disable ApiInspectorpublic
, secret
, and app_id
take your Pusher keysuri
will determine what URI endpoint is associated with the routeprefix
will add a prefix to the routesubdomain
will add a subdomain to the routemiddleware
adds middleware to the routeThe 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
.
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