2016-05-24 27 views
1

我只是通過作曲家composer require twbs/bootstrap安裝引導3,我想我怎麼能叫引導庫在我的母版頁default.blade.php不是通過這樣的HREF呼籲的:<link rel="stylesheet" href="too many to mention">這樣我就可以適用於一些風格在我導航。如何在laravel中調用bootstrap庫?

<!doctype html> 
<html> 
<head> 
<title>Home</title> 
</head> 
<body> 
    @include ('templates.partials.navigation') 
<div class = "container"> 
    @yield('content') {{-- @yield is always used to get content from a child page into master page. So this page will be master page. --}} 
</div> 
</body> 
</html> 

navigation.blade.php

<div class = "navbar navbar-inverse"> 
<ul> 
    <li> 
     <a href = "#">Login</a> 
     <a href = "#">Register</a> 
    </li> 
</ul> 
</div> 

我怎樣才能把我的導航應用的樣式沒有在我的母版頁導入樣式鏈接庫?

+0

閱讀此鏈接指令:http://getbootstrap.com/getting-started/#download-composer –

回答

0

剛發現我的問題的解決方案。

<link rel = "stylesheet" href= "{{ URL::asset('css/bootstrap.min.css')}}"> 
<div class = "navbar navbar-default"> 
<ul> 
    <li> 
     <a href = "#">Login</a> 
     <a href = "#">Register</a> 
    </li> 
</ul> 
</div> 
1

你可以使用URL()

<link rel = "stylesheet" href= "{{ url('css/bootstrap.min.css')}}"> 
<div class = "navbar navbar-default"> 
<ul> 
    <li> 
     <a href = "#">Login</a> 
     <a href = "#">Register</a> 
    </li> 
</ul> 
</div> 
相關問題