PHPackages                             kelvinkurniawan/lightorm - 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. kelvinkurniawan/lightorm

ActiveLibrary

kelvinkurniawan/lightorm
========================

A lightweight, modern ORM for PHP with Active Record pattern, query builder, soft deletes, and advanced features

10PHP

Since Aug 6Pushed 9mo agoCompare

[ Source](https://github.com/kelvinkurniawan/LightORM)[ Packagist](https://packagist.org/packages/kelvinkurniawan/lightorm)[ RSS](/packages/kelvinkurniawan-lightorm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

LightORM
========

[](#lightorm)

A lightweight, modern ORM for PHP with Active Record pattern, query builder, soft deletes, and advanced features.

Features
--------

[](#features)

- 🚀 **Active Record Pattern** - Intuitive object-relational mapping
- 🔍 **Advanced Query Builder** - Fluent interface for complex queries
- 🗑️ **Soft Deletes** - Preserve data with soft delete functionality
- ⏰ **Automatic Timestamps** - Auto-managed created\_at and updated\_at
- ✅ **Model Validation** - Built-in validation with custom rules
- 🎯 **Event System** - Model lifecycle hooks
- 🔄 **Attribute Casting** - Automatic type conversion
- 🛡️ **Mass Assignment Protection** - Secure fillable/guarded attributes
- 📦 **Query Scopes** - Reusable query constraints
- 💾 **Cache Integration** - Query result caching
- 🔄 **Database Transactions** - Transaction support

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

[](#installation)

Install via Composer:

```
composer require kelvinkurniawan/lightorm
```

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

[](#quick-start)

### 1. Configuration

[](#1-configuration)

First, configure your database connection:

```
