Reputation: 87
I am working with laravel 5.6 and install bootstrap with npm. this is My blade file,
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Acxian</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
</head>
<body>
<div class="content">
<div class="title m-b-md">
Acxian
</div>
<div class="links">
<a href="https://laravel.com/docs">Documentation</a>
<a href="https://laracasts.com">Laracasts</a>
<a href="https://laravel-news.com">News</a>
<a href="https://forge.laravel.com">Forge</a>
<a href="https://github.com/laravel/laravel">GitHub</a>
</div>
</div>
</div>
</body>
</html>
but above bootstrap is not working, how can link npm link with blade file?
Upvotes: 0
Views: 1104
Reputation: 314
Bootstrap is a default package in laravel. Since you have installed it, then just run
npm run dev
to compile them into public/css/app.css
and public/js/app.js
then you can link them to your blade files via {{asset('css/app.css')}}
and {{asset('js/app.js')}}
.
Upvotes: 1