search

Home  >  Q&A  >  body text

Shouldn’t the returned data be an array? Why is it the Student object again?

Shouldn’t the returned data be an array? Why is it the object of Student again?

酷酷的人酷酷的人2209 days ago1326

reply all(2)I'll reply

  • 乘风破浪

    乘风破浪2019-01-16 14:05:42

    If it is a normal query, for example, the access result of Db::table('Student') returns a non-object array, while querying through a template returns an object array

    reply
    0
  • A小卒过河

    A小卒过河2018-11-23 15:39:08

    Isn’t an array an object? Student::field(...)->find() is used, so it must be the object of Student, and it inherits the parent class Model.

    reply
    0
  • Cancelreply