当你在一个表(模型)上有两个变形关系时,在Laravels中正确的命名约定是什么?commentable2_type - string // type link to buyers/sellers
现在我使用名称commentable1和commentable2,但这不是一种很好的Laravel我怎样才能以正确的Laravel方式做到这一点呢?
根据下面的代码,我试图在“区段”和“旅游”之间创建一个关系,但是我得到了错误的Table 'yourproject.sections' doesn't exist (SQL: select * fromid' = 1 limit 1)注意:如果我将表名添加到模型中,就会得到一个新的错误。Simply tell Laravel the URIs it should respond to
| and give it the Closure to