question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using with Blade templates

See original GitHub issue

Hello. HEML looks super useful! I’d like to use it to build our Blade templates (for use with Laravel), however, I’m wondering how to get around the following issue.

For example, in my Blade file, I use

<a href="http://{{ $domain }}/auth/verify/{{ $user['confirmation'] }}">@lang('email.confirm_button')</a>

I want the contents inside the {{ }} tags to effectively be ignored by HEML. It mostly works, but there’s a problem with the quotation marks. Using the online editor, the above gives

<a href="http://{{ $domain }}/auth/verify/{{ $user[&#39;confirmation&#39;] }}" class="a"><span class="a__text">@lang('email.confirm_button')</span></a>

which is almost perfect, but the ' is replaced by &#39;.

If I include heml-ignore on the tag then the template parts work, but then I lose the HEML specific additions for a link.

<a href="http://{{ $domain }}/auth/verify/{{ $user['confirmation'] }}" heml-ignore="">@lang('email.confirm_button')</a>

Any ideas? Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
davidbarkercommented, Nov 29, 2017

Fantastic! I’m excited to try it out. Thank you so much, @avigoldman.

1reaction
LinusUcommented, Nov 21, 2017

Sounds good 👍

The only problem I can think of is that there are many different template systems out there. Ejs is quite common in the Node.js community and uses <% and %>. Some moustache flavours uses only a single { and }.

edit: didn’t read the last message, seems good 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blade Templates - The PHP Framework For Web Artisans
Blade template files use the .blade.php file extension and are typically stored in the resources/views directory.
Read more >
Laravel - Blade Templates - Tutorialspoint
Laravel - Blade Templates, Laravel 5.1 introduces the concept of using Blade, a templating engine to design a unique layout. The layout thus...
Read more >
How to Create Layout Using Laravel Blade [Ultimate Guide]
Here's the simple guide on how to create and get a fully ready layout in Laravel using Blade templating engine in just a...
Read more >
Blade Templates // Statamic 3 Docs
You can use Tags in Blade templates with a Laravel-style fluent syntax. Instantiate your tag with the Statamic::tag() method and chain parameters as...
Read more >
Laravel Blade Template - Javatpoint
The blade allows to use the templating engine easily, and it makes the syntax writing very simple. The blade templating engine provides its...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found