symfony/web-profiler-bundle
Provides the Symfony Web Profiler and debug toolbar for development. Inspect requests, routing, templates, database queries, logs, events, and performance metrics via an in-browser UI to speed up debugging and optimization.
WebProfilerBundle is designed for Symfony applications, offering deep integration with Symfony’s core components (e.g., HTTP kernel, Doctrine, Twig, Messenger). For Laravel projects leveraging Symfony components (e.g., via symfony/http-foundation, symfony/console, or symfony/dependency-injection), this bundle can be adapted but requires custom bridging logic (e.g., middleware, event listeners, or service containers).symfony/debug-bundle or symfony/messenger), integration is highly feasible with minimal effort. Otherwise, integration would require:
DataCollector interface./_profiler/ to a Laravel controller or route.debug:container) would need Laravel-specific implementations.symfony/debug), risks are minimal and primarily involve configuration rather than development.symfony/http-foundation, symfony/dependency-injection)? If yes, how deeply?symfony/debug-bundle, symfony/messenger, symfony/http-client)./debug/profiler).Stopwatch component for timing critical sections (e.g., controllers, services).symfony/http-foundation for request/response handling.symfony/debug for core profiler utilities.symfony/dependency-injection for service container integration.Query::listen() or DB::listen().namespace App\Profiler;
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
use Illuminate\Support\Facades\DB;
class EloquentCollector extends DataCollector {
protected $queries = [];
public function collect($request) {
DB::listen(function ($query) {
$this->queries[] = [
'query' => $query->sql,
'bindings' => $query->bindings,
'time' => $query->time,
];
});
$this->data['queries'] = $this->queries;
}
public function getName() { return 'eloquent'; }
}
/profiler route with Laravel Blade templates.symfony/debug-bundle, symfony/http-kernel, or symfony/dependency-injection.symfony/console, symfony/messenger, or symfony/http-client.symfony/debug, symfony/http-foundation)./profiler route with timing/memory metrics.How can I help you explore Laravel packages today?