Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
<?php | |
/* | |
Plugin Name: JS Test Widget | |
Description: Tests a frustrating issue | |
Author: Tom J Nowell | |
Version: 1.0 | |
License: GPLv2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
// Simple. This method allows you to make a request like http://myapi.com/api/batch?request=[{"url":"/api/profile/1", "type":"GET", "request_id":"1"}, {"url":"/api/profile/2", "type":"GET", "request_id":2}] | |
$requests = \Input::get('request'); | |
$requests = json_decode($requests); | |
$output = array(); | |
foreach ($requests as $request) { | |
$url = parse_url($request->url); |