tp6指定数据表连接时, 不能对查询数据集用where, 如果不指定数据表连接时,是没有问题的。
//User Model设置当前模型的数据库连接
protected $connection = 'db_config';使用select()查询后不能用where
$user = User::select();
return $user->where('code','0000'); // 返回 []
return User::where('code','0000')->select(); //正常返回数据