微调
This commit is contained in:
@@ -11,7 +11,7 @@ class CategoryController extends Controller
|
||||
/**
|
||||
* 显示分类
|
||||
* @param Category $category [description]
|
||||
* @return [type] [description]
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View [type] [description]
|
||||
*/
|
||||
public function index(Category $category)
|
||||
{
|
||||
@@ -24,7 +24,8 @@ class CategoryController extends Controller
|
||||
}
|
||||
$articles = $category->relations(Category::TYPE_ARTICLE)
|
||||
->where('status', 1)
|
||||
->latest()
|
||||
->latest('sort')
|
||||
->latest('created_at')
|
||||
->paginate(8);
|
||||
|
||||
$parent = $category;
|
||||
|
||||
Reference in New Issue
Block a user