静态资源

This commit is contained in:
2020-09-16 08:35:46 +08:00
parent 24315e4798
commit ac3b53b163
40 changed files with 8270 additions and 660 deletions

View File

@@ -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'));
}