Scripts js Bootstrap in Laravel

Asked

Viewed 136 times

0

Good afternoon

I am studying and developing a project with Laravel Framework but I came across a Front-end problem at the time I was using Bootstrap. I create the link to my script no more js bootstrap function works. For example my dropdown-toggle. When installing the bootstrap module I gave the following php Artisan preset, npm install and npm run dev commands. I would like your help grateful.

<nav class="navbar fixed-top navbar-expand-lg navbar-dark greyColor">
        <div class="container mb-0">
            <a class="navbar-brand h1 text-white mt-1" href="#">
                <img src="{{asset('img/banner4.png')}}" width="40" height="30" alt="" class="d-inline-block align-top" >
                CGC-Central Logística
            </a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSite">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarSite">
                <ul class="navbar-nav mr-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="inicial.php">Inicio</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" id="navDrop">
                            Contato Clientes
                        </a>
                        <div class="dropdown-menu bg-dark ">
                            <a class="dropdown-item text-light" href="cadFormContato.php">Cadastro Contato</a>
                            <a class="dropdown-item text-light" href="contatoRel.php">Relatorio Contatos</a>
                        </div>  
                    </li>
                </ul>
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item">
                       <a class="nav-link"><?php //echo $nome ?></a> 
                    </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="logoult.php">Sair</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    

    

<html lang="pt-br">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>Titulo @yield('title')</title>
        <link href="{{asset('css/app.css')}}" rel="stylesheet">
        <style>
            .imgLogo{
                height: 10%;
                width: 35%;
            }
            .greyColor{
                background-image: linear-gradient(#474545, #302a2a);
            }
        </style>
    </head>
    <body>
        @component('layouts.componente_navbar_user')
        @endcomponent
        <div class="container">
            <main>
                @hasSection ('body')
                    @yield('body')               
                @endif
            </main>
        </div>
        <script src="{{asset('js/app.js')}}" type="text/javascript"></script>
    </body>
</html>

  • What exactly is "not working" ? bootstrap css is not picking up on its elements?

  • The js functions of bootstrap are not working by app.js.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.