@section('title', {{exampleVariable}})
我怎样才能实现上述目标?
我一直在寻找答案,但没有发现任何相关内容。
只需使用:
@section('title', $exampleVariable)
代替。
{{
只是用来显示变量,把它当作PHP echo
方法,在这里你不想只是回显变量值
你可以这样做:
@section('title', $exampleVariable)
或这个:
@section('title')
{{ $exampleVariable }}
@endsection