Laravel 4 &引用;“屈服”;在没有空格的laravel中?
在laravel中,您可以执行以下操作:Laravel 4 &引用;“屈服”;在没有空格的laravel中?,laravel-4,laravel-5,Laravel 4,Laravel 5,在laravel中,您可以执行以下操作: @section('metadescription') description goes here... @stop 但这导致: <meta name="description" content=" XXXXXXXXX "> 我不想要那些空间。有没有办法只指定一组在生成时也会被修剪的参数?这解决了我的问题: @section('metadescription'){{ "Description goes here" }}@st
@section('metadescription')
description goes here...
@stop
但这导致:
<meta name="description" content=" XXXXXXXXX ">
我不想要那些空间。有没有办法只指定一组在生成时也会被修剪的参数?这解决了我的问题:
@section('metadescription'){{ "Description goes here" }}@stop
如果只向节传递简单字符串,则可以将该字符串作为第二个参数传递给
节
。例如:
@section('metadescription', 'Meta Description goes here')
我在下一行也放了一个@站。非常确定这不是必需的,但我喜欢在那里看到它。当您需要@overwrite不同模板中的某些部分扩展同一部分时,这也很有用