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

29 lines
787 B
PHP

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