where('floor_id', $floor_id)->select($columns) ->get()->toArray(); } public static function existsRoleMenu($floor_id, $nameArr): bool { $count = count($nameArr); $existsCount = self::query()->where('floor_id', $floor_id) ->whereIn('name', $nameArr)->count(); return $count != $existsCount; } public static function getName($id) { return self::query()->where('id', $id)->value('name') ?? ''; } }