"Losing" to laravel without spaces?

In laravel you can do this:

@section('metadescription')
   description goes here... 
@stop

But this leads to:

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

I do not need these spaces. Is there a way to specify only a set of parameters that are also trimmed upon delivery?

+4
source share
2 answers

This solved my problem:

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

If you only pass simple strings to a section, you can pass the string as the second argument to section. For instance:

@section('metadescription', 'Meta Description goes here')
+10
source

Source: https://habr.com/ru/post/1536210/


All Articles