admin管理员组文章数量:1430077
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.
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.
Share Improve this question asked Jun 10, 2017 at 11:04 flexflex 1151 gold badge3 silver badges9 bronze badges4 Answers
Reset to default 2I 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./ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
Laravel 5.2 es with bootstrap sass in place. You can find it under the resources directory:
https://github./laravel/laravel/blob/5.2/resources/assets/sass/app.scss
Just unment 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./ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
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">
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">**
本文标签: javascripthow to use bootstrap with Laravel 52Stack Overflow
版权声明:本文标题:javascript - how to use bootstrap with Laravel 5.2 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745505509a2661225.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论