码迷,mamicode.com
首页 > 其他好文 > 详细

Laravel(5)你的第一个应用4

时间:2014-10-29 23:45:56      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   color   ar   sp   div   on   log   

创建你的视图app/views/master.blade.php

 1 <!DOCTYPE html>
 2 <html lang="en">
 3     <head>
 4         <meta charset="UTF-8">
 5         <title>Cats DB</title>
 6         <link rel="stylesheet" href="{{asset(‘bootstrap-3.0.0.min.
 7         css‘)}}">
 8     </head>
 9     <body>
10         <div class="container">
11             <div class="page-header">
12                 @yield(‘header‘)
13             </div>
14             @if(Session::has(‘message‘))
15                 <div class="alert alert-success">
16                 {{Session::get(‘message‘)}}
17                 </div>
18             @endif
19             @yield(‘content‘)
20         </div>
21     </body>
22 </html>

about.blade.php

1 @extends(‘master‘)
2 @section(‘header‘)
3 <h2>About this site</h2>
4 @stop
5 @section(‘content‘)
6 <p>There are over {{$number_of_cats}} cats on this site!</p>
7 @stop

 

回到我们的路由.

 

Laravel(5)你的第一个应用4

标签:style   blog   io   color   ar   sp   div   on   log   

原文地址:http://www.cnblogs.com/jypwn/p/4060804.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!