nordsoftware / lumen-doctrine
Doctrine module for the Lumen PHP framework.
Installs: 4 076
Dependents: 1
Suggesters: 1
Security: 0
Stars: 41
Watchers: 13
Forks: 5
Open Issues: 3
Requires
- doctrine/orm: ~2.5
Requires (Dev)
- laravel/lumen-framework: ~5.1@dev
This package is not auto-updated.
Last update: 2020-01-24 15:49:23 UTC
README
Doctrine module for the Lumen PHP framework.
Requirements
- PHP 5.5 or newer
- Composer
Usage
Installation
Run the following command to install the package through Composer:
composer require nordsoftware/lumen-doctrine
Bootstrapping
Add the following line to bootstrap/app.php
:
$app->register('Nord\Lumen\Doctrine\ORM\DoctrineServiceProvider');
You can now use the EntityManager
facade or inject the EntityManagerInterface
where needed.
Configure
Copy config/doctrine.php
into config
and modify according to your needs.
The available configurations are:
- mapping - Mapping driver to use (xml, yaml or annotations), defaults to xml
- paths - Paths to entity mappings, defaults to an empty array
- types - Custom Doctrine types to register, defaults to an empty array
- proxy - Proxy configuration
- repository - Repository class to use
- logger - Logger class to use
Run Artisan
Run php artisan
and you should see the new commands in the doctrine:* namespace section.
Contributing
Please read the guidelines.
License
See LICENSE.