PHPackages                             rockeinstein/eloquent-zf2 - 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. [Framework](/categories/framework)
4. /
5. rockeinstein/eloquent-zf2

ActiveZf-module[Framework](/categories/framework)

rockeinstein/eloquent-zf2
=========================

Eloquent ORM module for Zend Framework 2

1.0.0(10y ago)119MITPHP

Since Feb 1Pushed 10y ago1 watchersCompare

[ Source](https://github.com/RockEinstein/eloquent-zf2)[ Packagist](https://packagist.org/packages/rockeinstein/eloquent-zf2)[ Docs](https://github.com/RockEinstein/eloquent-zf2)[ RSS](/packages/rockeinstein-eloquent-zf2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

EloquentZF2
===========

[](#eloquentzf2)

Eloquent ORM module for Zend Framework 2.

Features
--------

[](#features)

- `Eloquent Model` and `Capsule` suppot out of the box.
- `Validators` for forms: `RecordExists` and `NoRecordExists` (equivalent of `Zend\Validator\Db\RecordExists` and `Zend\Validator\Db\noRecordExists`).
- `Authentication` adapters (`Abstract` implementation supporting AuthenticationService and two implementations `CallbackCheckAdapter` and `CredentialTreatmentAdapter`).

Planned Features
----------------

[](#planned-features)

- Multi-connection configuration support.
- Caching support.
- Paginator support.
- Logger support.
- Session Handlers (not sure if needed yet).
- Migration support (via ZFTool).

Install
-------

[](#install)

`$ composer require edvinasme/eloquent-zf2:dev-master`

Setup
-----

[](#setup)

- Add `EloquentZF2` to the `modules` array in `config/application.config.php`
- You can now retrieve EloquentZF2 via SM: `$sm->get('EloquentZF2')` This gives you access to Eloquent Query Builder, Schema Builder etc. (see  for more information)
- Copy `vendor/edvinasme/eloquent-zf2/config/database.eloquent.config.php.dist`to `config/autoload/database.eloquent.config.php` and add database credentials.

Models
------

[](#models)

Your models should extend `Illuminate\Database\Eloquent\Model` for example:

```
