belongsTo('App\Models\Group'); } public function contacts() { return $this->belongsToMany('App\Models\Contact'); } public function history() { return $this->hasMany('App\Models\TaskHistory'); } public function notifications() { return $this->hasManyThrough('App\Models\Notification', 'App\Models\TaskHistory'); } }