Incluir bootstrap con composer

publicado por: Anonymous

estoy incluyendo bootstrap con el package de composer de la siguiente manera en el terminal composer require twbs/bootstrap:4.1.1 pero me gustaria incluir en el layout ya que no me funciona al momento de agregar alguna clase de bootstrap

solución

Asegurate de incluir el css y el javascript:

<!DOCTYPE html>
<html lang="en">
<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

  <!-- Bootstrap CSS -->
  <link rel="stylesheet" href="vendor/twbs/bootstrap/dist/css/bootstrap.min.css">

  <title>Hello, world!</title>
</head>
<body>

  <h1>Hello, world!</h1>
  <div class="row text-center">
    <span class="col-md-4 border border-primary">uno</span>
    <span class="col-md-4 border border-secondary">dos</span>
    <span class="col-md-4 border border-success">tres</span>
  </div>
  <div class="row text-center">
    <span class="col-md-1 border border-danger">1</span>
    <span class="col-md-2 border border-warning">2</span>
    <span class="col-md-3 border border-info">3</span>
    <span class="col-md-4 border border-light">4</span>
    <span class="col-md-5 border border-dark">5</span>
    <span class="col-md-6 border border-white">6</span>
  </div>

  <!-- Optional JavaScript -->
  <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
  <script src="vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
  <!-- el bundle ya incluye el popper -->
</body>


</html>
Respondido por: Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *