/**
  * get groups by user Id
  * @param $userId
  * @return mixed
  */
 public function getGroupsByUserId($userId)
 {
     $userGroup = $this->userGroup->whereUserId($userId)->first();
     return $this->organization->whereIn('id', $userGroup->assigned_organizations)->with(['settings'])->orderBy('name', 'asc')->get();
 }