写PHP的,也没啥
chrome devt-tool 有什么报错么?你有引入前端的配置?
路由模型绑定,你看看这个
https://www.laravist.com/series/what-is-new-in-laravel-5-2-series/episodes/1
哎。。。但凡看一下视频应该都会知道了
比如 https://www.laravist.com/series/user-experience-is-important-when-registered-a-user
你看看这个系列
https://www.laravist.com/series/peak-into-laravel-core-components
两个不一样的数据库的数据和表结构是一样的么?
5.4 也不是,但是 5.3 已经有足够的新特性了,并且跟视频是一致的,这样更能减少出错的概率
额,你这。。。。
protected $primaryKey = 'worker_id';
先看基础的文档先?
你有指定 Worker 的 primaryKey 么?
所以你直接用 5.3 吧,这样最好
1.Order 和 Worker 指定 primaryKey
2.定义多对多的时候,传入参数:
public funcrion works(){ return $this->belongsToMany(Worker::class,'order_worker','order_id','worker_id'); // 大概这样 }
额,你去搜一下“科学上网”,具体了解一下