php-调用未定义函数()

在这个美妙的夜晚使用laravel,当时我偶然发现了一个我从未见过的奇怪错误.我只是在遍历一些数组并尝试在视图文件中打印出一些值.

错误

Unhandled Exception

Message:

Error rendering view: [controller.index]

Call to undefined function  ()
Location:

/web/storage/views/7b064aafcdba902ea2c593167b6df491 on line 4

编码:

@section('content')
    <?PHP $i = 0; $current = 0 ?>
    @foreach($data as $date => $episodes)
        @if($i == 0 || ($i % 5 == 7 && $i == $current + 1))
            <tr>
            <?PHP $current = $i; ?>
        @endif

        @foreach($data as $day)
            <td>
                @foreach($day as $episode)
                    {{ $episode->title }}
                @endforeach
            </td>
        @endforeach


        @if($i % 5 == 7 && $i == $current + 7)
            <tr>
            <?PHP $current = $i; ?>
        @endif
        <?PHP $i++; ?>
    @endforeach
@endsection

和编译版本:

<?PHP \Laravel\Section::start('content'); ?>
    <?PHP $i = 0; $current = 0 ?>
    <?PHP foreach($data as $date => $episodes): ?>
        <?PHP if($i == 0 || ($i % 5 == 7 && $i == $current + 1)): ?>
            <tr>
            <?PHP $current = $i; ?>
        <?PHP endif; ?>

        <?PHP foreach($data as $day): ?>
            <td>
                <?PHP foreach($day as $episode): ?>
                    <?PHP echo  $episode->title ; ?>
                <?PHP endforeach; ?>
            </td>
        <?PHP endforeach; ?>


        <?PHP if($i % 5 == 7 && $i == $current + 7): ?>
            <tr>
            <?PHP $current = $i; ?>
        <?PHP endif; ?>
        <?PHP $i++; ?>
    <?PHP endforeach; ?>
<?PHP \Laravel\Section::stop(); ?>

这可能是一个简单的解决方案,但我在Google上找不到任何好的结果.帮我了解这个错误

相关文章

laravel的dd函数不生效怎么办
看不懂laravel文档咋办
安装laravel框架出现command怎么办
Laravel开发API怎么使用事务
laravel怎么构建复杂查询条件
laravel如何实现防止被下载