为什么返回了很多没有必要的数据,
[0] => app\admin\model\User ob
(
[pk:protected] => user_id
[resultSetType:protected] => collecton
[connection:protected] => Array
(
)
[parent:protected] =>
[query:protected] =>
[name:protected] => User
[table:protected] =>
[class:protected] => app\admin\model\User
[error:protected] =>
[validate:protected] =>
[field:protected] => Array
(
)
[except:protected] => Array
(
)
[disuse:protected] => Array
(
)
[readonly:protected] => Array
(
)
[visible:protected] => Array
(
)
[hidden:protected] => Array
(
)
[append:protected] => Array
(
)
[data:protected] => Array
(
[user_id] => 1
[user_login] => admin
[user_pass] => 123456
[user_nicename] => admin
[user_email] => admin@sina.com
[user_phone] => 15889745718
[user_registered] => 2018-07-17 15:35:05
[user_status] => 0
[user_role] => 1
)
我只需要数据表里有的字段就行了,怎么设置
最佳答案