platx / yii2-http-error-helper
触发 HTTP 异常的辅助工具
dev-master
2016-10-20 14:24 UTC
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2020-10-09 02:48:31 UTC
README
触发 HTTP 异常的辅助工具
安装
安装此扩展的首选方法是使用 composer。
运行以下命令之一
php composer.phar require --prefer-dist platx/yii2-http-error-helper "*"
或者将以下内容添加到你的 composer.json
文件的 require 部分中。
"platx/yii2-http-error-helper": "*"
使用以下命令之一
用法
一旦安装了扩展,只需在你的代码中使用它即可
<?= \platx\httperror\HttpError::the404('Not found!') ?>