Reputation: 115
I need use bootstrap 3 with My Laravel app. I have download bootstarp and paste it Laravel public-css folder. now I need integrate its with My Laravel app. how can I do this? I do not use bootstrap theme. only css and js files. I need exit cdn.
Upvotes: 4
Views: 3911
Reputation: 11
Bootstrap is already included with Laravel. On Laravel 5.8 it is under public/css/app.css location
you just need to add the file to the blade template to use bootstrap like this
**<link href="{{ asset('css/app.css') }}" rel="stylesheet">**
Upvotes: 0
Reputation: 592
after past myapp/public/css/bootstrap.min.css file
you have to import css boostrap sourse,
<link rel="stylesheet" href="<?php echo asset ('css/bootstrap.min.css')?>" type="text/css">
Upvotes: 0
Reputation: 115
I found an solution try this one
download the bootstrap package and
copy bootstrap.min.css into your public/css folder
copy bootstrap.min.js into your public/js folder
Add the following to the head area of app.blade.php
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet">
Before the closing in app.blade.php add
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
Upvotes: 2
Reputation:
Laravel 5.2 comes with bootstrap sass in place. You can find it under the resources directory:
https://github.com/laravel/laravel/blob/5.2/resources/assets/sass/app.scss
Just uncomment the @import line and build the public resources with gulp or something. To include the javascript just include it in your document head like you would any other resource.
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
Upvotes: 1