FEATURE #2389 @2h: add request detail into profiler

This commit is contained in:
Michal Kváček
2017-03-24 01:28:21 +01:00
parent 52e02d67c6
commit 05c9e56973
11 changed files with 273 additions and 90 deletions
@@ -0,0 +1,23 @@
<?php
namespace Modules\Profiler\Http\Controllers;
use App\Http\Controllers\Admin\Controller;
use Modules\Profiler\Entities\HttpLog;
class RequestController extends Controller
{
public function detail(HttpLog $httpLog)
{
$sameRequests = HttpLog::where('url', $httpLog->url)
->where('method', $httpLog->method)
->get();
$times = [
'avg' => $sameRequests->avg('time'),
'min' => $sameRequests->min('time'),
'max' => $sameRequests->max('time')
];
return view('profiler::request.detail', compact('httpLog', 'sameRequests', 'times'));
}
}