Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 laravel 中,你可以这样做:
@section('metadescription') description goes here... @stop
但这会导致:
<meta name="description" content=" XXXXXXXXX ">
我不想要那些空间。有没有办法只指定一组在产生时也会被修剪的参数?
如果您只是将简单字符串传递给该部分,则可以将字符串作为第二个参数传递给section. 例如:
section
@section('metadescription', 'Meta Description goes here')
这解决了我的问题:
@section('metadescription'){{ "Description goes here" }}@stop