|
@@ -57,8 +57,8 @@ class UpdatePostStatus extends Command
|
|
|
{
|
|
|
$this->line("开始更新内容用户状态");
|
|
|
|
|
|
- $bar = $this->output->createProgressBar($this->post->count());
|
|
|
- $this->post->chunk(100, function($posts) use ($bar){
|
|
|
+ $bar = $this->output->createProgressBar($this->post->withTrashed()->count());
|
|
|
+ $this->post->withTrashed()->chunk(100, function($posts) use ($bar){
|
|
|
foreach($posts as $post) {
|
|
|
//点赞
|
|
|
$likeUid = $this->postLike->where('post_id', $post->id)->pluck('uid')->toArray();
|