简体   繁体   中英

Display variable value in escaped Laravel blade template code

I'm using this code in order to display it without execution in Laravel template:

@{{ Ads::Display('ad_id') }}

Is it possible to display real value of ad_id part?

This won't work for instance:

@{{ Ads::Display('$ad->slug') }}

I think you'll have use plain PHP for that:

{{ Ads::Display('<?php echo $ad->slug; ?>') }}

The @ sign is redundant, the code works without it

For Laravel 4 use

@{{ {{{  Ads::Display('ad_id') }}} }}

and for Laravel 5 use

@{{ {!!  Ads::Display('ad_id') !!} }}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM