search

Home  >  Q&A  >  body text

If the laravel model does not define a name, it will change the model name to a plural number?

If the name of the table is not defined in laravel's model, it will automatically query like this. For example, the Student model will search for students. The university model will search for universities. They all become plural automatically. What is strange is that he still understands the grammar. Some add s and some remove y. Add ies

黄舟黄舟2857 days ago385

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-05-16 16:52:05

    It seems like this is the rule. How to do it depends on the source code

    reply
    0
  • Cancelreply