One way to get around this would be to use the HtmlString
class:
@section('page_tagline', new \Illuminate\Support\HtmlString( __('pages.home.tagline')))
You could then take this one step further and create a macro
for the Str
class or a global helper function.
Macro Example
In you AppServiceProvider
(or any service provider you want) add the following to the boot
method:
Str::macro('html', function ($string) {
return new HtmlString($string);
});
Don't forget to add the following use
statements to the class:
use Illuminate\Support\HtmlString;
use Illuminate\Support\Str;
Then you @section
would look something like:
@section('content', Str::html( __('pages.home.tagline')))