public static function getAttachmentFamilies($args) { $query = AttachmentFamily::builder(); if (isset($args['resource_id_015'])) { $query->where('resource_id_015', $args['resource_id_015']); } return $query->get(); }