Closed jklue closed 4 years ago
I'm guessing you only want to output snippet() as a string since it is a php function?
Then just use the pipe |
operator and you should be fine:
.header
| snippet('logo')
| snippet('menu')
or in the case of for laravel blade:
.header
| {{ snippet('logo') }}
| {{ snippet('menu') }}
Sorry for the delay! I would like the output from the original post to be:
<header>
<?php snippet('logo') ?>
<?php snippet('menu' ?>
</header>
Unfortunately, the pipe operator is giving me the following, without adding the necessary PHP tags.
<header>snippet('logo') snippet('menu')</header
Edit: I wrote my own custom plugin, called :p
so it returns the text wrapped in <?php
and ?>
. I'd like to shorten even further to -
instead of :p
but don't know how.
Thanks so much for this plugin. Is there a shorthand to write PHP using this Laravel Mix package? I tried
and I got the
snippet is not a function
error