p3in/firephp

该软件包已被废弃,不再维护。作者建议使用 appcompass/firephp 软件包。

FirePHP 对 Laravel 4 的支持

1.1.7 2019-04-13 19:46 UTC

This package is auto-updated.

Last update: 2021-04-29 21:16:04 UTC


README

此 Laravel 4 软件包将 FirePHP 带到 Laravel 4。默认情况下,它将记录到您的 FireBug 控制台数据库查询信息和日志事件。

安装前

在安装此软件包之前,您应确保已安装 FirePHP Firefox 插件并启用 Firebug 网络面板。

安装 Firebug 安装 FirePHP

安装

p3in/firephp 添加到您的 composer 需求中

"require-dev": {
	"p3in/firephp": "dev-master"
}

接下来,从终端更新 Composer

$ composer update --dev

安装软件包后,打开您的 app/config/app.php 配置文件并找到 providers 键。将以下行添加到末尾。

'P3in\Firephp\FirephpServiceProvider',

最后,发布默认配置(它将出现在 app/config/packages/p3in/firephp/config.php 中)

$ php artisan config:publish p3in/firephp

用法

您可以使用多种方式使用它。

// Use the built in Log system
Log::info('This is some useful information.');
Log::warning('Something could be going wrong.');
Log::error('Something is really going wrong.');

// Use the Firebug methods.
FB::group('testGRoup');
	FB::info('This is some useful information.');
	FB::warn('Something could be going wrong.');
	FB::error('Something is really going wrong.');
FB::groupEnd();

// Or a combination of both.
FB::group('testGRoup');
	Log::info('This is some useful information.');
	Log::warning('Something could be going wrong.');
	Log::error('Something is really going wrong.');
FB::groupEnd();

请注意,默认情况下,所有记录的事件都将发送到您的 FireBug 控制台。

享受吧!请随时提供任何反馈或功能请求。