Files
core/modules/Profiler/Http/Controllers/RequestController.php
T

23 lines
678 B
PHP

<?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'));
}
}