So my Mailable view is throwing this error - and this is all I have on my hands. It was working fine while I was on Lumen 5.8, so my guess is that it happened after upgrading to Laravel 6.

调用未定义的函数数组_except()(视图:

My blade file looks like this:

@extends('mail.master')

@section('content')
<tr>
    <td align="left" style="border: 1px solid #dddee5; border-bottom: 2px solid #cecfd9; padding; 20px;">
        <div class="padded">
            <p>
            {!! nl2br(e($data->message)) !!}
            </p>
        </div>
    </td>
<tr>
<tr>
    <td align="left" bgcolor="#eaeaf2" class="padded">
        <p style="margin-bottom: 5px;" class="cta-label">{{ $data->copy->click }}</p>
        <div class="cta-link">
            <a style="color: #337BE9;" class="cta-link--a" href="{{ $data->appUrl }}/{{ $data->route }}/{{ $data->verificationCode }}">{{ $data->appUrl }}/{{ $data->route }}/{{ $data->verificationCode }}</a>
        </div>
        <p style="font-size: 12px; margin-top: 10px;">{{ $data->copy->mistake }}</p>
    </td>
</tr>
@endsection

where obviously no part of the code is trying to call that function.

我的Composer.json如下所示:

{
    "name": "laravel/lumen",
    "description": "The Laravel Lumen Framework.",
    "keywords": ["framework", "laravel", "lumen"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.3.9",
        "laravel/lumen-framework": "^6.0",
        "vlucas/phpdotenv": "^3.3",
        "firebase/php-jwt": "^4.0",
        "guzzlehttp/guzzle": "^6.3",
        "illuminate/mail": "6.0.0",
        "phanan/cascading-config": "~2.0",
        "nesbot/carbon": "^2.0",
        "neitanod/forceutf8": "2.0.1",
        "maatwebsite/excel": "^3.1",
        "mpdf/mpdf": "^8.0",
        "tecnickcom/tcpdf": "^6.3",
        "laravel/helpers": "^1.1"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "phpunit/phpunit": "~5.0",
        "mockery/mockery": "~0.9"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/",
            "database/"
        ]
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ]
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

where the laravel/helpers are also included now, separately. Nothing has helped so far. Any ideas what is causing this error?

推荐答案

派对有点晚了,但是:

as others have mentioned str_ and array_ helpers have been moved to a seperate package. If you don't wish to use that package after updating to laravel 6 you have to clear the views that were compiled using the old helper methods.

composer dump-autoload

then

php artisan view:clear

worked for me

Laravel相关问答推荐

无法在终端cPanel中打开输入文件:artisan

如何定制有关密码被泄露的Laravel Breeze S消息?

Laravel 通过 API 嵌套 url 发布

按回车键时如何防止此功能运行?

如何使用 laravel 更新单个值

如何提取每组 groupBy 查询的唯一值?

在 laravel 4.2 中,用户 'root'@'localhost' 的 Laravel 访问被拒绝(使用密码:YES)

上传时Laravel正在旋转图像

使用 Eloquent 的 Laravel 块方法

Laravel 5 如何全局设置 Cache-Control HTTP 标头?

Eager加载:在具有eloquent关系的枢轴上使用`with`

Homestead 2.0 多个站点,都链接到同一个 url

致命错误:找不到类App\Http\Controllers\Redirect

将 Laravel Socialite 与 API 一起使用?

Laravel 5.1-5.8 中以前的路由名称

如何在 Laravel 中正确安装软件包?

Laravel/PHPUnit:断言 json 元素存在而不定义值

日期时间格式无效:1366 字符串值不正确

向 Laravel 重定向添加一个锚点

如何在特定项目中禁用初始化 JS/TS 语言功能?