Laravel-Broadway-Demo icon indicating copy to clipboard operation
Laravel-Broadway-Demo copied to clipboard

This is a test application using https://github.com/qandidate-labs/broadway

Laravel Broadway example app

This is an example application using the Broadway package.

It's basically the Broadway examples/ directory, but in a Laravel application. When I'm feeling more comfortable, there will be more examples.

This demo project uses the Laravel-Broadway package.

Requirements

  • PHP >=5.5
  • Elasticsearch
  • MySQL

Installation

Clone this repository

git clone https://github.com/nWidart/Laravel-Broadway-Demo.git

Configure the database connection information

Edit the config/database.php file to suit your needs.

Run the migrations

php artisan migrate

Run the server

php artisan serve

Examples

Command Handling

  • Route: /command-handling
  • Code: Modules/Controllers/HomeController@index

Event Dispatcher

  • Route: /event-dispatcher
  • Code: Modules/Controllers/HomeController@eventDispatcher

Event Handling

  • Route: /event-handling
  • Code: Modules/Controllers/HomeController@eventHandling

Event sourced child entity

  • Route:
    • Read: /parts/index
    • Write: create part modal on /parts/index
    • Rename with inline editing on the /parts/index uri
  • Code: Modules/Parts
  • Tests: Tests/Parts/

Event sourced domain

  • Route: n/a
  • Code: coming soon
  • Tests: coming soon

Serializer

  • Route: coming soon
  • Code: coming soon