'integer', ]; /* ========================= * legacy method equivalents * ========================= */ public static function getAllClasses() { return static::query()->get(); } public static function getClassById(int $id): ?self { return static::query()->find($id); } public static function createClass(array $data): int { $row = static::create($data); return (int) $row->id; } public static function updateClass(int $id, array $data): bool { return static::query()->whereKey($id)->update($data) >= 0; } public static function deleteClass(int $id): bool { $row = static::query()->find($id); if (!$row) return false; return (bool) $row->delete(); } }