PHPackages                             ancalagon/glaurlink - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ancalagon/glaurlink

ActiveLibrary[Database &amp; ORM](/categories/database)

ancalagon/glaurlink
===================

A lightweight, zero-dependency ORM for PHP 8.4+ and MariaDB/MySQL with type-safe models, enum support, and built-in migrations

v0.1.5(3mo ago)0108MITPHPPHP &gt;=8.4

Since Dec 26Pushed 3mo agoCompare

[ Source](https://github.com/bmairlot/glaurlink)[ Packagist](https://packagist.org/packages/ancalagon/glaurlink)[ Docs](https://github.com/bmairlot/glaurlink)[ RSS](/packages/ancalagon-glaurlink/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (8)Used By (0)

Glaurlink
=========

[](#glaurlink)

A lightweight, zero-dependency ORM for PHP 8.4+ and MariaDB/MySQL.

Features
--------

[](#features)

- **Minimal Dependencies** — Only requires PHP core extensions (mysqli, ctype)
- **Type-Safe Models** — Automatic type validation using PHP reflection
- **Enum Support** — Native PHP backed enum integration for database columns
- **Simple CRUD** — Intuitive `find()`, `save()`, `insert()`, `collection()`, and `count()` methods
- **Search &amp; Pagination** — Built-in support for LIKE queries, ordering, and pagination
- **Collections** — Type-safe, iterable collections implementing Iterator, ArrayAccess, and Countable
- **JSON Serialization** — Models and collections are JSON-serializable out of the box
- **Lightweight Migrations** — File-based migrations with transaction support and rollback capability

Requirements
------------

[](#requirements)

- PHP 8.4 or higher
- mysqli extension
- ctype extension
- MariaDB or MySQL database

Installation
------------

[](#installation)

```
composer require ancalagon/glaurlink
```

Quick Start
-----------

[](#quick-start)

### Defining a Model

[](#defining-a-model)

Create a model by extending the base `Model` class:

```
