Reputation: 749
I followed this turotial as basic laravel learning. I executed composer require illuminate/html
. To import bootstrap in my project, in 'providers', I added
Illuminate\View\ViewServiceProvider::class,
Illuminate\Html\HtmlServiceProvider::class,
And in alaises, i added
'Form'=> Illuminate\Html\FormFacade::class,
'Html'=> Illuminate\Html\HtmlFacade::class,
But the bootstrap does not seem to be working.
{!! Form::open() !!}
<div class="form-group">
{!! Form::label("name : ", "Your name") !!}
{!! Form::text("username", null, ["class"=>"form-control"]) !!}
</div>
{!! Form::close() !!}
The text field does not stretch to the width of page, as it is supposed to.
Any idea why is it so? or any other alternative solution ?
Upvotes: 2
Views: 858
Reputation: 372
You need to include link to bootstrap in your html template file.
<!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>
Upvotes: 4