belongsTo(User::class,'user_id'); } public function messages() { return $this->hasMany(Message::class, 'pid'); } }