furqat/laravel-console-log
最新稳定版本:0.5
Composer 安装命令:
composer require furqat/laravel-console-log
包简介
This package allows backend developers to effortlessly output messages and values in the terminal, serving as the PHP equivalent of console log for Laravel.
README 文档
README
Laravel Console Log
This package allows backend developers to effortlessly output messages and values in the browser's console via PHP.
Installation
You can install the package via composer:
composer require furqat/laravel-console-log
Usage
class HomeController extends Controller { public function index() { $users = User::all(); //it will show the count of users in the console of browser console()->info('The count of users is: ' . $users->count()); return view('users', compact($users)); } }
How It Works
When you call console()->log(...$args) in your Laravel application, the package stores the logged messages and values in the cache. This allows the logs to be easily accessed and managed without cluttering the terminal or log files.
To view these logs, simply open any view in your browser. The package streams the cached logs to the frontend in real-time and show logs in browser's console using console.log(), providing a clear and organized view of all your log entries. This makes it easy for developers to monitor and debug their applications without interrupting their workflow.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 62
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-02

