Skip to content

Instantly share code, notes, and snippets.

@webinfinita
Last active November 5, 2023 15:21
Show Gist options
  • Save webinfinita/a3a84c2a994cd031932a to your computer and use it in GitHub Desktop.
Save webinfinita/a3a84c2a994cd031932a to your computer and use it in GitHub Desktop.
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
Copy link

therali commented May 29, 2018

Thank you very much for these codes!

@fernandojmartin
Copy link

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