first commit

This commit is contained in:
2020-09-14 14:29:29 +08:00
commit 3ac390f68f
767 changed files with 166582 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers;
use App\Models\Advert;
use App\Models\Article;
class ArticleController extends Controller
{
/**
* 显示分类
* @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();
return view('article.show', compact('article', 'parent', 'category','advert'));
}
}