composer require laravel/ui --dev
php artisan ui bootstrap
Did you execute this?
Source: https://laravel.com/docs/master/frontend#introduction
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
My goal is to have Bootstrap css/js on my site - so i never rely on external links.
I was experimenting with new Laravel project laravel new lara and was trying to add Bootstrap following documentation.
I might have missed something cause that did'nt work as i was expecting.
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
if i don't include code above on my page - Bootstrap is not working
was trying to install via
composer require twbs/bootstrap
composer require twbs/bootstrap-sass
npm install bootstrap
npm install bootstrap-sass
even tried downloading precompiled files
every case i had Bootstrap's styles/scripts not working as expecting - button is been shown in ugly way without styles
<button type="button" class="btn btn-primary">Primary</button>
i do believe i'm missing something or doing something wrong. need help
composer require laravel/ui --dev
php artisan ui bootstrap
Did you execute this?
Source: https://laravel.com/docs/master/frontend#introduction
Please or to participate in this conversation.