[英]bootstrap not working in laravel5
我遵循此教程作為基本的laravel學習。 我執行了composer require illuminate/html
。 為了在我的項目中導入引導程序,在“提供者”中,我添加了
Illuminate\View\ViewServiceProvider::class,
Illuminate\Html\HtmlServiceProvider::class,
而且,我補充說
'Form'=> Illuminate\Html\FormFacade::class,
'Html'=> Illuminate\Html\HtmlFacade::class,
但是引導似乎沒有起作用。
{!! Form::open() !!}
<div class="form-group">
{!! Form::label("name : ", "Your name") !!}
{!! Form::text("username", null, ["class"=>"form-control"]) !!}
</div>
{!! Form::close() !!}
文本字段不會像預期的那樣延伸到頁面的寬度。
知道為什么會這樣嗎? 或任何其他替代解決方案?
您需要在HTML模板文件中包含引導程序的鏈接。
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div id = "container">
@yield("content")
</div>
</body>
</html>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.