静态资源
This commit is contained in:
@@ -10,18 +10,20 @@ class ArticleController extends Controller
|
||||
|
||||
/**
|
||||
* 显示分类
|
||||
* @param Category $category [description]
|
||||
* @param Category $category [description]
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function show(Article $article)
|
||||
{
|
||||
$parent = $category = $article->category;
|
||||
if ($category->childrens->isEmpty()) {
|
||||
$parent = $category->parent;
|
||||
}
|
||||
$advert = Advert::where('category_id',73)->first();
|
||||
$category = $article->category;
|
||||
$parent = getTopCate($category->id);
|
||||
|
||||
return view('article.show', compact('article', 'parent', 'category','advert'));
|
||||
$next = Article::where('id', '>', $article->id)
|
||||
->where('category_id', $article->category_id)
|
||||
->where('status', 1)
|
||||
->first();
|
||||
|
||||
return view('article.show', compact('article', 'next', 'parent'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user