Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bootstrap modal blade partial view for Laravel
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Titulo</h4>
</div>
<div class="modal-body">
Contenido
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
<button type="submit" class="btn btn-primary">Actualizar</button>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content"></div>
</div>
</div>
// En la vista
@include('modal')
<a data-toggle="modal" href="{{ route('posts.create') }}" data-target="#myModal">Añadir nuevo post</a>
@therali

This comment has been minimized.

Copy link

therali commented May 29, 2018

Thank you very much for these codes!

@fernandojmartin

This comment has been minimized.

Copy link

fernandojmartin commented Nov 9, 2019

AHH!, Lo amé!!
Dead f#4king simple code!!!
Muchísimas gracias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.