Download the PHP package prooph/laravel-package without Composer
On this page you can find all versions of the php package prooph/laravel-package. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download prooph/laravel-package
More information about prooph/laravel-package
Files in prooph/laravel-package
Package laravel-package
Short Description Laravel package for prooph components to get started out of the box with message bus, CQRS, event sourcing and snapshots
License BSD-3-Clause
Homepage http://getprooph.org
Informations about the package laravel-package
Laravel package for prooph components
Overview
This is a Laravel package for prooph components to get started out of the box with message bus, CQRS, event sourcing
and snapshots. It uses the prooph/pdo-event-store
event store however there are more adapters available.
It provides all service definitions and a default configuration. This is more like a Quick-Start package. If you want to use the prooph components in production, we recommend to configure the prooph components for your requirements. See the documentation for more details of the prooph components.
For rapid prototyping we recommend to use our prooph-cli tool.
Available services
Prooph\ServiceBus\CommandBus
: Dispatches commandsProoph\ServiceBus\EventBus
: Dispatches eventsProoph\ServiceBus\QueryBus
: Allows for querying over a message bus.Prooph\EventStoreBusBridge\TransactionManager
: Transaction manager for service bus and event storeProoph\EventStoreBusBridge\EventPublisher
: Publishes events on the event bus
Available event stores
Prooph\EventStore\Pdo\MariaDbEventStore
: MariaDB event store adapterProoph\EventStore\Pdo\MySqlEventStore
: MySQL event store adapterProoph\EventStore\Pdo\PostgresEventStore
: PostgreSQL event store adapter
Available facades
CommandBus
: Usage: https://github.com/prooph/laravel-package/blob/master/examples/command_bus.phpEventBus
: Usage: https://github.com/prooph/laravel-package/blob/master/examples/event_bus.phpQueryBus
: Usage: https://github.com/prooph/laravel-package/blob/master/examples/query_bus.php
Installation
You can install prooph/laravel-package
via Composer by adding "prooph/laravel-package": "^0.4"
as requirement to your composer.json.
Service Provider
If you are using Laravel 5.5 or higher the package will automatically register itself. Otherwise you need to add Prooph\Package\ProophServiceProvider
to your
providers array.
Then you will have access to the services above.
This package has configuration files which can be configured to your needs.
Deploy the prooph config files to add your configuration for the prooph components.
Database
Setup your database migrations for the Event Store and Snapshot with:
Update the class CreateEventStreamTable
:
And now for the snapshot table.
Update the class CreateSnapshotTable
:
Now it's time to execute the migrations:
Example
You have only to define your models (Entities, Repositories) and commands / routes. Here is an example config from the proophessor-do example app.
Define the aggregate repository, command route and event route for RegisterUser
in config/prooph.php
.
Add the service container factories to config/dependencies.php
.
Here is an example how to call the RegisterUser
command:
Here is an example how to get a list of all users from the example above:
Support
- Ask questions on Stack Overflow tagged with #prooph.
- File issues at https://github.com/prooph/laravel-package/issues.
- Say hello in the prooph gitter chat.
Contribute
Please feel free to fork and extend existing or add new plugins and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and may adapt the documentation.
License
Released under the New BSD License.
All versions of laravel-package with dependencies
psr/container Version ^1.0
illuminate/support Version ^5.0
illuminate/contracts Version ^5.0
illuminate/bus Version ^5.0
prooph/event-sourcing Version ^5.0
prooph/event-store Version ^7.0
prooph/event-store-bus-bridge Version ^3.0
prooph/pdo-event-store Version ^1.0
prooph/service-bus Version ^6.0
prooph/pdo-snapshot-store Version ^1.1
sandrokeil/interop-config Version ^2.0