在这里插入代码片$users = User::where('status', '=', 1)->select(); $userArray = collection($users)->toArray();
php tp5对象转数组select出对象转数组,不需要用toarray
最新推荐文章于 2024-07-28 08:43:29 发布
在这里插入代码片$users = User::where('status', '=', 1)->select(); $userArray = collection($users)->toArray();