Outputting object properties #1786
Unanswered
titantwentyone
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We have legacy Laravel app which we're upgrading to use Maizzle 6. One issue we've come across is how to output the correct blade syntax so that Laravel can correctly generate the mail. The following works fine:
<Raw>{{ $obj }}</Raw>results in{{ $obj }}However,
<Raw>{{ $obj->prop }}</Raw>results in{{ $obj->prop }}I also looked at use
v-prebut,<Raw v-pre>{{ $obj }}</Raw>results in<raw content="{{ $obj }}"></raw><Raw v-pre>{{ $obj->prop }}</Raw>results in<raw content="{{ $obj->prop }}"></raw>out of curiosity I tried:
<Raw :content="'{{ $obj->prop }}'" />but this results in{{ $obj->prop }}The docs state that
Rawwill output whatever is passed verbatim but enities are being encoded here.The only way round this we could find is to provide an
afterTransformfunction in the config:This seems to do the job but just want to make sure that this is the best/optimum way.
Feel like I am missing soemthing obvious! Any advice/insights appreciated. TY in advance!
All reactions