Download the PHP package cycle/active-record without Composer
On this page you can find all versions of the php package cycle/active-record. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cycle/active-record
More information about cycle/active-record
Files in cycle/active-record
Package active-record
Short Description Provides a simple way to work with your database using Active Record pattern and Cycle ORM
License MIT
Homepage https://cycle-orm.dev
Informations about the package active-record
Active Record Implementation for Cycle ORM
This library extends Cycle ORM by integrating the Active Record pattern, providing developers with an intuitive, object-centric way to interact with databases.
Unlike Cycle ORM's default Data Mapper pattern, which separates the in-memory object representations from database operations, Active Record combines data access and business logic in a single entity.
This allows for more straightforward and rapid development cycles, particularly for simpler CRUD operations, by enabling direct data manipulation through the object's properties and methods.
Prerequisites
Before you begin, ensure your development environment meets the following requirements:
- PHP Version: 8.1 or higher
- One of the Cycle ORM adapters:
spiral/cycle-bridgeofficial Cycle ORM adapter for the Spiral Frameworkyiisoft/yii-cycle— official Cycle ORM adapter for the Yii 3wayofdev/laravel-cycle-orm-adapter— package managed by @wayofdev for the Laravel 10.x or higher.
Installation
The preferred way to install this package is through Composer.
After package install you need to, optionally, register bootloader / service-provider in your application.
→ Spiral Framework
[!NOTE]
If you are installing the package on the Spiral Framework with the spiral-packages/discoverer package, then you don't need to register bootloader by yourself. It will be registered automatically.
Update Bootloader list in your application configuration:
For more information about bootloaders, refer to the Spiral Framework documentation.
→ Laravel
[!NOTE]
If you are using Laravel, then you don't need to register service-provider by yourself. It will be registered automatically.
→ Yii 3
For configuration instructions refer to yii-cycle installation guide.
→ Other Frameworks
This package uses PSR-11 compatible container to resolve dependencies. After container initialization you need to pass container instance to the static facade:
Usage
[!NOTE]
For detailed usage instructions, refer to the documentation.
→ Basic Example
Define Entity with ActiveRecord
Create a new record
→ Advanced Usage Examples
Query Builder Integration
Batch Operations and Transactions
Want to Contribute?
Thank you for considering contributing to the cycle community! We are open to all kinds of contributions. If you want to:
- 🤔 Suggest a feature
- 🐛 Report an issue
- 📖 Improve documentation
- 👨💻 Contribute to the code
You are more than welcome. Before contributing, kindly check our contribution guidelines.
All versions of active-record with dependencies
cycle/database Version ^2.20
cycle/orm Version ^2.18
cycle/transaction Version ^1.1
psr/container Version ^2.0.2
yiisoft/injector Version ^1.2.1