mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-23 05:27:59 +01:00
24 lines
No EOL
531 B
PHP
24 lines
No EOL
531 B
PHP
<?php
|
|
|
|
namespace Api\Web;
|
|
|
|
use Entities\ProfileRequest;
|
|
use Illuminate\Support\Facades\Cache;
|
|
use Illuminate\Support\Facades\Config;
|
|
use Illuminate\Support\Facades\Response;
|
|
|
|
class ProfilerController extends \Controller {
|
|
public function getRequest($id) {
|
|
if (!Config::get('app.debug'))
|
|
return;
|
|
|
|
$key = 'profiler-request-' . $id;
|
|
$request = Cache::get($key);
|
|
if (!$request)
|
|
exit();
|
|
|
|
Cache::forget($key);
|
|
|
|
return Response::json(['request' => ProfileRequest::load($request)->toArray()], 200);
|
|
}
|
|
} |