首页 > 其他 > 详细

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

时间:2014-10-29 23:44:59      阅读:322      评论:0      收藏:0      [点我收藏+]

创建你的视图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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!