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
@@ -1,15 +1,28 @@
<?php namespace Modules\Profiler\Http\Controllers;
use App\Http\Controllers\Admin\Controller;
use Illuminate\Support\Facades\Input;
use Modules\Profiler\Entities\HttpLog;
class ProfilerController extends Controller
{
public function index()
{
$filters = [];
$httpLog = HttpLog::orderBy('created_at', 'DESC')
->with('queries')
->paginate(25);
->with('queries');
if (Input::get('method')) {
$filters[] = 'method';
$httpLog = $httpLog->where('method', Input::get('method'));
}
if (Input::get('url')) {
$filters[] = 'url';
$httpLog = $httpLog->where('url', Input::get('url'));
}
$httpLog = $httpLog->paginate(25);
return view('profiler::index', compact('httpLog'));
}