表category、category_description和descriptions是相关的:{return $this->belongsToMany(Description::class);
public function categories(): BelongsTo { return $this->belongsToMany(Ca
如何将联接表外键作为复合主键进行后缀处理?我认为这是默认情况下完成的,但是当我试图保存我的UserMenuItem实例(它是User和MenuItem之间的联接表)时,得到了以下错误:Error: You attempted to save an: 'menuItemID', onDelete: 'CASCADE' }); // I tried adding "otherKey: 'userID'" as well
mod