Skip to content

Commit 71b986e

Browse files
committed
fix(control): 查询指定字段防止数据过大
1 parent bd3a625 commit 71b986e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

laravel/app/Http/Controllers/Api/ArticleController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(Request $request)
4242
*/
4343
public function index()
4444
{
45-
$list = Article::orderBy('id', 'DESC')->paginate($this->perPage);
45+
$list = Article::orderBy('id', 'DESC')->select('id', 'title', 'author', 'keywords', 'created_at')->paginate($this->perPage);
4646
return $this->out(200, $list);
4747
}
4848

0 commit comments

Comments
 (0)