Support the ongoing development of Laravel.io →
Eloquent Blade
Last updated 2 years ago.
0

escaping vs non escaping is done by using

{{  ...  }}

vs

{!!  ...  !!}
0
Solution

If you include the modal with @include you can pass an array with params as second parameter. The value of a param can be anything, like html. But I would not pass in a lot of html because it smells. Maybe you could use something like this:

@include('partials.modal', ['buttons' => ['delete', 'save', 'dismiss'])

and then in you modal template you could use @if statements around each button to check if it is in the buttons array. But it all depends on what you are trying to build. Perhaps seperate modals would be better? Hope it helps, good luck!

0

frezno said:

escaping vs non escaping is done by using

{{  ...  }}

vs

{!!  ...  !!}

In L5, L4 uses {{{ $escaped }}}. Not sure what version ottz0 uses.

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ottz0 ottz0 Joined 15 Nov 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.