redberry / laravel-console
Laravel Console 是查看应用程序日志的便捷方式
v1.1.2
2021-07-05 06:37 UTC
README
Laravel Console
Laravel console 是一个方便的工具,它允许您以 javascript-y 方式调试 Laravel 应用程序代码。您将在开发工具面板中获得 Laravel Console,您将访问所有由 Laravel Console 记录的日志,并且您将看到这些信息而无需终止代码执行!
目录
先决条件
为了开始使用 Laravel Console,您必须安装 Laravel 8.x。
入门
为了使用 Laravel Console,您需要做两件事。首先,您应该安装 Laravel Console 包
composer require redberry/laravel-console --dev
该包会自动发现,因此您不需要注入服务提供者。
完成此步骤后,您需要安装 Laravel Console 扩展程序到您的 Chrome 浏览器中,然后您就可以开始使用了 😊
使用方法
为了能够在 Laravel Console 开发工具页面上记录信息,您提供了一个外观
use Redberry\LaravelConsole\Facades\Console; Console::emergency ('hi there!'); Console::alert ('hi there!'); Console::critical ('hi there!'); Console::error ('hi there!'); Console::warning ('hi there!'); Console::notice ('hi there!'); Console::info ('hi there!'); Console::log ('hi there!');
相应地,您可以使用辅助函数和更方便的记录方式
console()->emergency ('hi there!'); console()->alert ('hi there!'); console()->critical ('hi there!'); console()->error ('hi there!'); console()->warning ('hi there!'); console()->notice ('hi there!'); console()->info ('hi there!'); console()->log ('hi there!');
享受记录过程 😋