s94/debug

Laravel 5 的 Debug API 包装器。

1.1.1 2015-03-15 10:59 UTC

This package is not auto-updated.

Last update: 2024-09-28 16:39:35 UTC


README

Laravel 5 的 Debug API 包装器。

Build Status Latest Stable Version License

安装

使用 Composer 在项目根目录下要求此包。

composer require s94/Debug:~1.0

将服务提供者添加到 config/app.php 中的 providers 数组。

'S94\Debug\DebugServiceProvider'

如果您想使用 facade,可以在 config/app.php 中添加引用到您的别名数组。

'Debug' => 'S94\Debug\Facades\Debug'

配置

Laravel Debug 需要连接配置。要开始,您需要发布所有供应商资源

php artisan vendor:publish

这将在您的应用中创建一个 config/debug.php 文件,您可以修改它以设置您的配置。同时,请确保检查此包中原始配置文件在版本之间的更改。

使用方法

DebugManager

这是最有兴趣的类。它绑定到 ioc 容器作为 hashids,可以使用 Facades\Hashids facade 访问。此类通过扩展 AbstractManager 实现 ManagerInterface。接口和抽象类都是 @GrahamCampbell Laravel Manager 包的一部分,所以您可能想查看该存储库中的文档以了解如何使用管理器类。注意,返回的连接类始终是 Hashids\Hashids 的实例。

Facades\Debug

此 facade 将动态地将静态方法调用传递到 ioc 容器中的 Hashids 对象,默认情况下是 HashidsManager 类。

DebugServiceProvider

此类没有感兴趣的公共方法。此类应添加到 config/app.php 中的 providers 数组。此类将设置 ioc 绑定。