- 12
- 0
- 约1.31万字
- 约 12页
- 2016-05-13 发布于江西
- 举报
Laravel大型项目系列教程(四).doc
Laravel大型项目系列教程(四)
一、前言
上节教程中实现了发布文章的功能,本节教程中将大概实现在首页和用户主页分页显示文章和标签列表、用户能够修改删除文章。
二、Lets go
1.首页显示文章和标签列表
我们需要在首页显示文章和标签列表,修改views/index.blade.php:
@extends(_layouts.default)
@section(main)
div class=am-g am-g-fixed
div class=am-u-md-8
@foreach ($articles as $article)
article class=blog-main
h3 class=am-article-title blog-title
a href={{ URL::route(article.show, $article-id) }}{{{ $article-title }}}/a
/h3
h4 class=am-article-meta blog-meta
by a href=#{{{ $article-user-nickname }}}/a posted on {{ $article-created_at-format(Y/m/d H:i) }
原创力文档

文档评论(0)