dtkt/errors

该软件包最新版本(1.0.1)没有可用的许可证信息。

DtKt 错误视图模块

1.0.1 2019-04-01 08:58 UTC

This package is auto-updated.

Last update: 2024-08-29 05:12:34 UTC


README

需要在您的 App\Exceptions\Handler 类中覆盖 registerErrorViewPaths 方法。

    protected function registerErrorViewPaths()
    {
        $paths = collect(config('view.paths'));

        View::addNamespace('errors', $paths->map(function ($path) {
            return "{$path}/errors";
        })->push(dirname((new \ReflectionClass(\Illuminate\Foundation\Exceptions\Handler::class))->getFileName()).'/views')->all());
    }