0

I'm developing a blade view on Laravel 5.4 which tests if a variable is set. If it is not set, the blade must present a little piece of html code placed into it. The problem is Laravel ignores or doesn't recognize the @isset directive rendering the string as if it was a simple html code. See the picture:

enter image description here

I have done a ugly workaround using @if(! empty($test) ). And I already tried to clean the cache with php artisan cache:clear.

Did someone know something that can cause this problem? Thanks a lot!

4

1 回答 1

0

我解决了Laravel Framework5.4.15更新到5.4.36的问题。

首先,停止您的服务器(如果您正在使用php artisan serve)。

然后composer update在项目的根目录上运行。

可能您需要php artisan cache:clear在再次为项目服务之前运行,在我的情况下,这不是必需的。

这是 Laravel 女巫的一个奇怪行为,可能是 Laravel 框架 5.4.15 或更早版本上的一个小错误。

于 2018-01-17T17:44:31.313 回答