问题描述
所以我的Mailable视图抛出此错误-这就是我的全部.当我使用Lumen 5.8时,它运行良好,所以我猜想是在升级到Laravel 6之后发生的.
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.
我的刀片文件如下:
@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看起来像这样:
My composer.json looks like this:
{
"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
}
现在还分别包含了 laravel/helpers
.到目前为止,没有任何帮助.有什么想法导致此错误吗?
where the laravel/helpers
are also included now, separately. Nothing has helped so far. Any ideas what is causing this error?
推荐答案
晚了一点,但是:
str_和array_ helper已移到单独的程序包中.如果您不希望在更新为laravel 6后使用该软件包,则必须清除使用旧的辅助方法编译的视图.
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
然后
php artisan view:clear
为我工作
这篇关于流明/Laravel 6:调用未定义的函数array_except()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!