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!
frezno said:
escaping vs non escaping is done by using
{{ ... }}
vs
{!! ... !!}
In L5, L4 uses {{{ $escaped }}}. Not sure what version ottz0 uses.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community