Update README.md
This commit is contained in:
21
README.md
21
README.md
@@ -2,6 +2,27 @@
|
|||||||
|
|
||||||
Easily add scalar metadata to a Symfony entity via the use of a key-value interface.
|
Easily add scalar metadata to a Symfony entity via the use of a key-value interface.
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
1. Add this repository to `composer.json`:
|
||||||
|
```json
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "ssh://git@git.pcmdev.co.uk:2222/pcm-libraries/pcm-metadata-bundle.git"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
```
|
||||||
|
2. Install the bundle:
|
||||||
|
```sh
|
||||||
|
composer require pcm/metadata-bundle
|
||||||
|
```
|
||||||
|
3. If not set already add the following config to `doctrine.yaml` to prevent errors:
|
||||||
|
```yaml
|
||||||
|
doctrine:
|
||||||
|
orm:
|
||||||
|
enable_native_lazy_objects: true
|
||||||
|
```
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
1. Use the `MetadataTrait` inside an entity:
|
1. Use the `MetadataTrait` inside an entity:
|
||||||
```php
|
```php
|
||||||
|
|||||||
Reference in New Issue
Block a user