为了账号安全,请及时绑定邮箱和手机立即绑定

下拉菜单不显示在导航栏 Laravel 6.0 中

下拉菜单不显示在导航栏 Laravel 6.0 中

PHP
慕村9548890 2022-07-16 16:59:12
我有我想在我的视图中显示的下拉列表,但它没有部署,我在我的下拉列表中看不到选项,我该如何解决下面我将index function()显示该视图、视图中的下拉列表部分和我的脚本Index function()public function index(Request $request,$correo)    {        return view('home.homeRegister')->with('correo',$correo);    }看法!DOCTYPE html><html>  <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 href="{{ asset('css/app.css') }}" rel="stylesheet">    <title>ACAVUCAB</title>    </head><body> <nav class="navbar navbar-expand-lg navbar-dark bg-dark  ">  <div class="container">   <ul class="navbar-nav mr-auto">          <!-- Authentication Links -->          <div class="dropdown">            <a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">              Dropdown link            </a>            <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">              <a class="dropdown-item" href="#">Action</a>              <a class="dropdown-item" href="#">Another action</a>              <a class="dropdown-item" href="#">Something else here</a>            </div>          </div>  </ul> </div></nav></body></html>脚本 <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
查看完整描述

2 回答

?
慕码人8056858

TA贡献1803条经验 获得超6个赞

你能测试一下这段代码吗?也许您忘记添加引导 js 脚本:


<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>

    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">

<nav class="navbar navbar-expand-lg navbar-dark bg-dark  ">

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

  <div class="container">

   <ul class="navbar-nav mr-auto">

          <!-- Authentication Links -->

          <div class="dropdown">

            <a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

              Dropdown link

            </a>


            <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">

              <a class="dropdown-item" href="#">Action</a>

              <a class="dropdown-item" href="#">Another action</a>

              <a class="dropdown-item" href="#">Something else here</a>

            </div>

          </div>

  </ul>

 </div>

</nav>

如果这个答案还不够。请提供更多信息。



查看完整回答
反对 回复 2022-07-16
?
元芳怎么了

TA贡献1798条经验 获得超7个赞

我把它修好


在里面<head>


<script src="{{ asset('js/app.js') }}" defer></script>

    <!-- Bootstrap CSS -->

    <link rel="stylesheet" href="css/bootstrap.min.css">

<script>以下


<script src="js/bootstrap.min.js"></script>


查看完整回答
反对 回复 2022-07-16
  • 2 回答
  • 0 关注
  • 96 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信