my laravel bootstraps does't work

Published 5 months ago by Ramazan

how to use the bootstrap in laravel I have set the links like

Ramazan
<!-- my Bootstrap link -->
<link href="{{ asset('css/bootstrap.css') }}" rel="stylesheet">
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ asset('css/bootstrap.theme.css') }}" rel="stylesheet">
<link href="{{ asset('css/bootstrap.theme.main.css') }}" rel="stylesheet">
<!--  myjQuery  (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
Snapey
Snapey
5 months ago (1,036,605 XP)

have you removed app.css and app.js from your layout?

Why do you load both boostrap.css and the minified version of the same thing boostrap.min.css ?

Have you put the files in public/css folder?

Ramazan

Yes I did i have put the bootstrap files in public/css folder but it does't work yet

Snapey
Snapey
5 months ago (1,036,605 XP)

There were three questions ?

Ramazan

i have put the file public/css/bootstrap and its the link

biishmar

@Ramazan did u check the network tab? are you getting 404 error?

Ramazan

Yes I have checked i got no error just i have awful view in browser

Snapey
Snapey
5 months ago (1,036,605 XP)

please LOOK at my THREE questions

Ramazan

Yes I have removed app.css and app.js and also i have edit my link and also put file in public/css like this public/css/bootstrap

Ramazan

now it is my link

Sabonzy

i assume the the files are located in the bootstrap folder then the link should look like this


<link href="{{ asset('css/bootstrap/bootstrap.min.css') }}" rel="stylesheet">

<link href="{{ asset('css/bootstrap/bootstrap.theme.main.css') }}" rel="stylesheet">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->

<script src="{{ asset('js/bootstrap/bootstrap.min.js') }}"></script>

beside there is no need including both bootstrap.css and bootstrap.min.css.

i think u are better off leaving your asset in the resource/assets folder to leverage the power laravel mix

biishmar

@ramazan would you pls screenshot the weird look?

Please sign in or create an account to participate in this conversation.