Webman Admin 在生成菜单的时候 ,生成的model,

zhl715474578

问题描述

这里写问题描述

如何支持外键? 是否是需要自己修改model里面的文件?

class WsBook extends Base
{
/**

  • The table associated with the model.
  • @var string
    */
    protected $table = 'ws_book';

    /**

  • The primary key associated with the table.
  • @var string
    */
    protected $primaryKey = 'id';

}

class WsBookClassify extends Base
{
/**

  • The table associated with the model.
  • @var string
    */
    protected $table = 'ws_book_classify';

    /**

  • The primary key associated with the table.
  • @var string
    */
    protected $primaryKey = 'id';

}

比如这两个表,书籍表和书籍分类表

111 1 0
1个回答

walkor 打赏

Webman Admin 生成model没做外键支持

  • 暂无评论
🔝