/** * parse communications */ protected function parseCommunicationRecipients($recipients) { if (empty($recipients)) { return null; } $u = json_decode($recipients); if (!is_array($u) || is_array($u) && count($u) < 1) { return null; } $getUsers = \Veer\Models\User::whereIn('id', $u)->get(); $itemsUsers = array(); foreach ($getUsers as $user) { $itemsUsers[$user->id] = $user; } return $itemsUsers; }