URL::asset()
引入站内css和js
1 <link rel="stylesheet" href="{{ URL::asset('css/bootstrap.css') }}"> 2 <script type="text/javascript" src="{{ URL::asset('js/jquery.min.js') }}"></script>
注:默认相对于web根目录,也就是public
目录
引入站外css和js:
1 <link rel="stylesheet" href="{{ URL::asset('//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css') }}"> 2 <script type="text/javascript" src="{{ URL::asset('//code.angularjs.org/1.2.13/angular.js') }}"></script>