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
Console Log

Console Log Laravel Package

leanadmin/console-log

A Laravel package for sending server-side debug messages and variables directly to the browser console. Use simple helpers to inspect PHP data in DevTools without interrupting your app, making local debugging faster and easier.

View on GitHub
Deep Wiki
Context7

consoleLog() for Livewire components

Frequently asked questions about Console Log
What is leanadmin/console-log and what does consoleLog() do?
leanadmin/console-log is a small Laravel package that sends server-side debug messages and variables to the browser console, so you can inspect PHP data in DevTools while the app keeps running. The consoleLog() helper is intended for Livewire components and other Laravel code where you want quick client-side visibility without interrupting the request. It is a developer-experience utility rather than a production logging system.
How do I install leanadmin/console-log in a Laravel project?
Install it with Composer using composer require leanadmin/console-log, then confirm that Laravel package auto-discovery registered the service provider and helper. Run a smoke test in a non-production branch by calling consoleLog() from a Livewire component and checking the browser DevTools console. Because this is a v0.1.x package, pin a known version instead of using a floating constraint if stability matters.
Does leanadmin/console-log work with Livewire components?
Yes, the package is described as consoleLog() for Livewire components, and its main purpose is inspecting server-side PHP data from Livewire interactions in the browser console. You can call the helper inside component methods to see values during local debugging. It does not replace Livewire's own debugging tools or a full application logging setup.
Which Laravel and PHP versions does leanadmin/console-log support?
The technical evaluation indicates integration is feasible for Laravel 9+ applications, and Laravel 8 support was dropped in the v0.1.4 release. The exact PHP version constraint is not stated in the provided context, so check the package's composer.json before installing. Run composer update in a branch to verify resolution against your existing dependencies.
Why did leanadmin/console-log remove Laravel 8 support in a patch release?
The v0.1.3 to v0.1.4 change primarily tightened dependency constraints, and Laravel 8 support was dropped as part of that dependency fix. Dropping framework support in a patch release is a maturity signal for a v0.1.x package and means breaking changes may not always follow semantic versioning. Pin the package version and review release notes before updating.
Is leanadmin/console-log safe to use in production?
It is intended as a local and staging debugging aid, not as a production logging solution. Enabling it in production could write sensitive application data to browser consoles, so production use should be explicitly prohibited. The evaluation notes that the package does not document a production guard in the provided context, so enforce this through configuration and code review.
How do I prevent consoleLog() output from appearing in production?
Use environment checks around calls, such as only invoking consoleLog() when app()->environment('local') or a dedicated debug flag is true. Also keep the package out of production deployment paths if possible and review configuration before promoting a build. Because the helper is a simple function, there is no guaranteed built-in production guard described in the evaluation.
Does leanadmin/console-log work in queue workers, API tests, or non-browser contexts?
The package sends messages to the browser console, so it is not useful in queue workers, CLI commands, or API tests where no browser DevTools console is attached. In those contexts the helper may silently produce no visible output or be unavailable. Use Laravel's standard logging for server-side and non-browser debugging.
What should I check if consoleLog() output does not show up in DevTools?
First confirm the package installed at the expected version and that Laravel auto-discovery registered its service provider and helper. Then verify you are calling consoleLog() from a request that actually renders in the browser and that DevTools is open with the correct console context. Clear caches and check for Composer dependency conflicts if the helper appears to be missing.
How is leanadmin/console-log maintained, and are there alternatives?
It is an open-source, community-driven v0.1.x package with no vendor SLA, so maintenance cadence and test coverage should be verified in the repository before relying on it. For broader needs, consider Laravel's built-in logging, Livewire debugging tools, or other browser-console debug packages. Evaluate alternatives if you need stable semantic versioning or production-grade safeguards.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
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