File "ClearCachedEventHandlersCommand.php"

Full Path: /var/www/html/back/vendor/spatie/laravel-event-sourcing/src/Console/ClearCachedEventHandlersCommand.php
File size: 508 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Spatie\EventSourcing\Console;

use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;

class ClearCachedEventHandlersCommand extends Command
{
    protected $signature = 'event-sourcing:clear-event-handlers';

    protected $description = 'Clear cached event handlers';

    public function handle(Filesystem $files): void
    {
        $files->delete(config('event-sourcing.cache_path').'/event-handlers.php');

        $this->info('Cached event handlers cleared!');
    }
}