Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel 4 &引用;“屈服”;在没有空格的laravel中?_Laravel 4_Laravel 5 - Fatal编程技术网

Laravel 4 &引用;“屈服”;在没有空格的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

在laravel中,您可以执行以下操作:

@section('metadescription')
   description goes here... 
@stop
但这导致:

 <meta name="description" content=" XXXXXXXXX ">


我不想要那些空间。有没有办法只指定一组在生成时也会被修剪的参数?

这解决了我的问题:

@section('metadescription'){{ "Description goes here" }}@stop

如果只向节传递简单字符串,则可以将该字符串作为第二个参数传递给
。例如:

@section('metadescription', 'Meta Description goes here')

我在下一行也放了一个@站。非常确定这不是必需的,但我喜欢在那里看到它。当您需要@overwrite不同模板中的某些部分扩展同一部分时,这也很有用