Skip to content

Commit

Permalink
Add the in memory example in the read model
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Jan 20, 2015
1 parent dcd5290 commit 345dab4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions readme.md
Expand Up @@ -112,6 +112,17 @@ $this->app->bind('Modules\Parts\Repositories\ReadModelPartRepository', function
});
```

For an In Memory read model as an example:

``` php
$this->app->bind('Modules\Parts\Repositories\ReadModelPartRepository', function ($app) {
$serializer = $app['Broadway\Serializer\SerializerInterface'];
return new InMemoryReadModelPartRepository($app['Inmemory'], $serializer);
});
```



See the [demo laravel application](https://github.com/nWidart/Laravel-Broadway-Demo) and specifically the [Service Provider](https://github.com/nWidart/Laravel-Broadway-Demo/blob/master/Modules/Parts/PartServiceProvider.php) for an working example.


Expand Down

0 comments on commit 345dab4

Please sign in to comment.