| Conditions | 3 |
| Paths | 4 |
| Total Lines | 26 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function boot() |
||
| 12 | { |
||
| 13 | if ($this->app->runningInConsole()) { |
||
| 14 | $this->publishes([ |
||
| 15 | __DIR__.'/../config/event-projector.php' => config_path('event-projector.php'), |
||
| 16 | ], 'config'); |
||
| 17 | } |
||
| 18 | |||
| 19 | if (! class_exists('CreateStoredEventsTable')) { |
||
| 20 | $this->publishes([ |
||
| 21 | __DIR__.'/../database/migrations/create_stored_events_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_stored_events_table.php'), |
||
| 22 | ], 'migrations'); |
||
| 23 | } |
||
| 24 | |||
| 25 | $this->app->bind('command.event-projector:replay-events', ReplayEventsCommand::class); |
||
| 26 | |||
| 27 | $this->commands([ |
||
| 28 | 'command.event-projector:replay-events', |
||
| 29 | ]); |
||
| 30 | |||
| 31 | $this->app->singleton(EventProjectionist::class, function () { |
||
| 32 | return new EventProjectionist(); |
||
| 33 | }); |
||
| 34 | |||
| 35 | $this->app->alias(EventProjectionist::class, 'event-projector'); |
||
| 36 | } |
||
| 37 | |||
| 45 |