/** * Get all tags matching given type/s * * @param array $types * * @return array */ public static function getTagsByType($types) { array_map('ucfirst', $types); return Tag::whereIn('status', ['Active', 'Hidden'])->whereIn('type', $types)->lists('name', 'name'); }