I'm a Laravel newbie. I have just installed some 3rd party packages and I would like to integrate Twitter bootstrap into my script. Is there any way to do it, short of going into each package and adding the code to the blade templates of each view?
Within terminal:
laravel new project
cd project
composer require laravel/ui
php artisan ui bootstrap
npm install && npm run dev
Then, in the HTML that you are working on, pull in both the CSS and JavaScript:
<!doctype html>
<html lang="en">
<head>
...
<link href="/css/app.css" rel="stylesheet">
</head>
<body>
....
<script src="/js/app.js"></script>
</body>
</html>
@Svyat, hopefully, this answers your question as well.
Happy coding :)
I realize that this is old... but it was the top result that come up for me on Google. Hopefully this will help someone in the future.
If you are using Laravel 6.2,
Within terminal:
npm install bootstrap
Within app.scss:
@import "node_modules/bootstrap/scss/bootstrap";
In Terminal, run the following to generate /public/css/app.css file:
npm run dev
Within welcome.blade.php:
<link rel="stylesheet" href="/css/app.css">
Happy coding
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With