The WouterJEloquentBundle claims to integrate the Eloquent ORM into the Symfony2 framework.
If you wish to use the Symfony Serializer with Eloquent Models you can check EloquentSerializer.
This bundle is only guaranteed to work on the latest minor releases of the 2.x, 3.x and 4.x version of Symfony. While other minor releases might be supported, support for it isn't explicitly tested. Contribute to this repository to this repository if you want to add support for lower versions.
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require wouterj/eloquent-bundle "^0.2"
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new WouterJ\EloquentBundle\WouterJEloquentBundle(),
);
// ...
}
// ...
}
To use the Eloquent ORM and its database features, you need to configure the bundle with the database information:
wouterj_eloquent:
driver: mysql
host: localhost
database: db_name
username: root
password: pass
prefix: ~
For more information, refer to the documentation below.
- Installation
- Usage
- Migrations and Seeding
- Using Models in Forms
- Events and Observers
- Configuration
- License
- Contributing
- Backwards Compatibility
This project is licensed under the MIT license. For more information, see the license file included in this bundle.
I love contributors. You can submit fixes, report bugs, share your opinion, advocate this bundle or just say "hello". I welcome anything that makes this project better.
This bundle follows SemVer, meaning that no minor (1.x
) release will contain
BC breaks. A new major version is released as soon as BC breaks are introduced.
These will be explained in detail in the UPGRADE-*.md
file shipped with the
source code.
Classes or methods with the @internal
PHPdoc annotation are not meant to use
or extend. Backwards compatibility is not guaranteed. Classes or methods with
the @final
PHPdoc annotation are only meant for usage. Backwards
compatibility when extending these classes is not guaranteed.