Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Sqlens For Laravel

Sqlens For Laravel Laravel Package

pushery/sqlens-for-laravel

SQLens for Laravel gives you a clear lens on the SQL your application runs, helping you inspect, analyze, and debug queries during development. Lightweight and easy to drop into any Laravel project, it surfaces the database activity that matters so you can spot problems faster.

Deep Wiki
Context7

Database safety for Laravel on PostgreSQL and MySQL. SQLens lints the SQL your migrations actually emit for lock and downtime risk, audits live schemas, detects drift and security issues, classifies deploy risk, and provides deterministic CI-ready guards with explicit pass, fail, or undetermined results.

Frequently asked questions about Sqlens For Laravel
What is pushery/sqlens-for-laravel used for?
SQLens for Laravel is a development-focused package for inspecting and understanding the SQL queries a Laravel application runs. It captures query activity, highlights slow or expensive statements, and supports query analysis and optimization workflows. It is intended to help developers debug database behavior rather than serve as a production runtime dependency.
How do I install SQLens for Laravel?
Install it with Composer, typically as a development dependency using composer require --dev pushery/sqlens-for-laravel. The package is described as having simple, Laravel-friendly configuration and Artisan entry points, so you will usually publish or edit a config file and run the provided command. Check the package documentation for the exact command names and any required database connection settings.
Does SQLens for Laravel work in production?
The package is positioned for development and CI-time query inspection, not as a runtime dependency in the request path. The technical assessment notes that a tool of this class should sit outside production latency and availability concerns, but live schema or database access still needs security review. Avoid enabling it in production unless you have reviewed credentials, permissions, and data exposure.
Which Laravel versions are supported by SQLens for Laravel?
The provided context does not list specific Laravel version constraints, so verify the composer.json requirements and README before adopting it. Because it is a Laravel package installed through Composer, compatibility will be defined by its illuminate/support and related dependency constraints. Test it against your application's Laravel and PHP versions in a branch before rolling it out.
Can SQLens help me find slow or expensive queries?
Yes, one of its stated purposes is to capture and display SQL queries and highlight slow or expensive statements for review. It is meant to support query analysis and optimization workflows so you can spot costly database activity during development. Use it alongside Laravel's own query logging, Laravel Telescope, or database EXPLAIN plans for deeper diagnosis.
Does SQLens add overhead to my Laravel application?
The package is described as lightweight and easy to drop into a Laravel project, but any query capture layer can add overhead if left enabled. Treat it as a development or CI tool and keep it out of the production request path. Measure in your own environment if you plan to run it during test suites or long debugging sessions.
How do I configure SQLens for Laravel?
Configuration is described as Laravel-friendly, typically involving a published config file and a database connection used for inspection. The technical assessment mentions Artisan entry points and a config file as the main integration surface. Confirm the exact keys and environment variables in the package README, especially if you connect to a staging or disposable database.
Can I use SQLens for Laravel in CI or automated tests?
It can fit a CI workflow as a development dependency with Artisan commands, but you should validate the SQL-emission and database-access mechanism in a spike first. The assessment notes that some modes may require a live database service container, which adds CI minutes and potential flakiness. Define whether warnings or undetermined results should fail the build before making it a gate.
Is SQLens for Laravel safe to use with database credentials?
The repository is listed as unknown and community adoption is very low, so treat it as a high-trust component if it will hold database credentials or read schema metadata. Pin the version, run composer audit, review the source, and restrict the database user to the minimum permissions needed. For production-adjacent use, complete a security review or vendor a reviewed fork internally.
What alternatives to SQLens for Laravel should I consider?
Laravel Telescope, Laravel Debugbar, Laravel's built-in query log, and database-native tools such as EXPLAIN and pg_stat_statements cover much of the same query inspection space. For migration or schema-change risk, the assessment also points to human review and CI checks as complementary practices. Compare SQLens against those tools for slow-query visibility, CI integration, and maintenance risk.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections