不能将类型为Illuminate \ Http \ Response的对象用作数组(Larravel / October CMS)

问题描述 投票:1回答:1

我在菜单(Build)上单击此错误,所以我不明白。有人可以帮我吗?为什么这会在下面的这一行令人发指?

     public function run($url = null)
    {
        $params = RouterHelper::segmentizeUrl($url);

        // Handle NotFoundHttpExceptions in the backend (usually triggered by abort(404))
        Event::listen('exception.beforeRender', function ($exception, $httpCode, $request) {
            if (!$this->cmsHandling && $exception instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException) {
                return View::make('backend::404');
            }
        }, 1);

        /*
         * Database check
         */
        if (!App::hasDatabase()) {
            return Config::get('app.debug', false)
                ? Response::make(View::make('backend::no_database'), 200)
                : $this->passToCmsController($url);
        }

 the erro start happining at this line---------->

        $controllerRequest = $this->getRequestedController($url);
        if (!is_null($controllerRequest)) {
            return $controllerRequest['controller']->run(
                $controllerRequest['action'],
                $controllerRequest['params']
            );
        }

        /*
         * Fall back on Cms controller
         */
        return $this->passToCmsController($url);
    }
laravel octobercms
1个回答
0
投票

要创建视图,您无需做出回应。代替

Response :: make(View :: make('backend :: no_database'),200)

使用

return View::make('backend::no_database');

或此用于自定义页面

return View::make('author.plugin::backend.file'); # htm is on views/backend/file.htm

通过上面的方式检查同一文件,它具有return View::make('backend::404');

© www.soinside.com 2019 - 2024. All rights reserved.