初步完成

This commit is contained in:
2021-03-25 16:05:06 +08:00
parent ae1ba1d4e9
commit 9d041184ea
124 changed files with 4358 additions and 4034 deletions

View File

@@ -16,8 +16,10 @@ class ArticleController extends Controller
*/
public function show(Article $article)
{
$category = $article->category;
$parent = getTopCate($category->id);
$parent = $category = $article->category;
if ($category->id) {
$parent = getTopCate($category->id);
}
$next = Article::where('id', '>', $article->id)
->where('category_id', $article->category_id)
@@ -36,6 +38,7 @@ class ArticleController extends Controller
->when($title, function ($q) use ($title) {
$q->where('title', 'like', "%{$title}%");
})
->where('category_id', '>', 0)
->paginate();
return view('article.search', compact('articles'));