PHP code example of antwerpes / laravel-event-store
1. Go to this page and download the library: Download antwerpes/laravel-event-store library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Antwerpes\LaravelEventStore\Facades\EventStore;
EventStore::push('event-name');
// Or with additional data
EventStore::push('event-name', ['foo' => 'bar']);
// This will work
EventStore::push('event-name');
return view('some-view');
// This will also work
EventStore::push('event-name');
return redirect()->route('some-route');