laravel刀片变量从刀片传递到刀片会导致错误

时间:2020-04-09 15:35:55

标签: php laravel laravel-blade

在我的刀片中,我有@include('pages.partials.plans_mobile', ['price' => '$30/mo.'])

在pages.partials.plans_mobile.blade.php此行中

 <div class="plans-table_border">
        <div>
            <p class="pricing-text">{{$price}}</p>
            <p id="billed-three-months">Billed every 3 months</p>
        </div>
    </div>

无法识别$ price。

以下是错误的屏幕截图 enter image description here

为什么这不起作用?

0 个答案:

没有答案