model->uid], ['auth_type', config("miniprogram.public_id")] ])->firstOrFail(); } catch (ModelNotFoundException $exception) { return; } $mocks = MockThumbModel::where('thumb_user', $auth->auth_key)->get(); foreach ($mocks as $mock) { /** @var MockThumbModel $mock */ PraiseModel::create([ 'uid' => $mock->uid, 'partner_id' => $event->model->id, 'create_at' => $mock->created_at->timestamp, 'created_at' => $mock->created_at->timestamp, 'updated_at' => $mock->created_at->timestamp, 'type' => 1 ]); } MockThumbModel::where('thumb_user', $auth->auth_key)->update(['sync' => 1]); } }