Home  >  Q&A  >  body text

Do all one-to-one relationships between Laravel data tables use hasOne or hasOne and belongsTo?

Laravel data tables are related one-to-one, use hasOne for both data tables? Or should one table use hasOne and the other table use belongsTo?

天蓬老师天蓬老师2700 days ago873

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-05-16 16:56:24

    One table uses hasOne, one table uses belongsTo

    reply
    0
  • Cancelreply