I haven"t given an AR assignment for a long time. Today we"ll take a look at my needs.
there is a datasheet, user (id, username and created_at, with a total of 4 records. This is required for the job. Use AR to achieve the following results:
An one-dimensional array whose key is user"s id, array and value"s user"s username, is similar to the following result
[
1=>"abei",
2=>"abei2017",
11=>"abei2018"
]
remember, only use AR, without resorting to other class libraries, such as Helper::map