'喜欢通知', 2 => '下载通知', 3 => '保存通知', 4 => '下架通知', 5 => '关注的人发了新作品', 6 => '系统通知']; } public function user(){ return $this->hasOne(User::class,'id','to_user_id'); } public function product(){ return $this->hasOne(Product::class,'id','product_id'); } public function read(){ return $this->hasMany(MsgRead::class,'msg_id','id'); } }