php - Laravel Homestead 中的引导程序
问题描述
我正在使用 Laravel Homestead(通过 Windows 上的 vagrant),但我的引导程序不起作用。我知道这一点,因为我在我的普通 php 网站上的头像是一个圆圈(使用引导程序完成)并且它不在 Laravel 网站中(而且如果我从引导程序网站复制一些代码,它不会很好也)。我是 Laravel 的新手,我的印象是 Homestead 中包含了 boostrap,尽管我不知道为什么它当时不起作用。我尝试(只是为了让舒尔)在我的布局文件中从引导程序中添加 css 和 js,但即使这样也不能解决问题。在我的站点结构中,我看到了一个引导文件夹。那么,我需要以某种方式激活它吗?它和普通的 Laravel 一样吗(意思是如果你单独安装所有东西而不是使用 Homestead),我会怎么做?
我的布局代码是:
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@yield('title', 'Scorpion To Do')</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
<script src="https://kit.fontawesome.com/a6c4b1e6d8.js" crossorigin="anonymous"></script>
<!-- Like I said, I added the bootstrap css to test it out -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<div class="flex-center position-ref full-height">
@if (Route::has('login'))
<div class="top-right links">
@auth
<a href="{{ url('/home') }}">Home</a>
@else
<a href="{{ route('login') }}">Login</a>
@if (Route::has('register'))
<a href="{{ route('register') }}">Register</a>
@endif
@endauth
</div>
@endif
<div class="content">
<!-- In my normal php site, this avatar is in a round circle, that is how I know bootstrap is not working, because her it is not -->
<div class="login100-form-avatar">
<img src="{{ URL::to('/images/avatar-01.jpg') }}" alt="AVATAR" />
</div>
@yield('content')
</div>
</div>
<!-- And also added the js from the bootstrap site -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
解决方案
推荐阅读
- python - 从 python 中的汤返回中分离 SRC 属性
- angular - Angular 2 应用程序是否应该部署在 Web 服务器或像 Tomcat 这样的应用程序服务器上?
- python - 无法在python3.6中导入包
- windows - 在自定义程序的一个实例中打开多个文件
- java - 如何在没有 dex 的情况下在 Android 上加载类
- java - TextView 中的 HTML 文本并在新活动中打开链接
- c# - 使用 RemoveChild() 删除孩子
- r - R将一个因子列分成代表几个因子水平的几列
- python-3.x - 即使找到检查点,Tensorflow warm_start
- html - 防止子边框半径影响 IE 和 Edge 中的父级