I need to collect an array of data in EventListener ( \Illuminate\Cache\Events\CacheHit ), and get this array somewhere in the controller. How is it better to organize?

    1 answer 1

    Well, as an option, pass an anonymous method to the called event. In general, EventListener should not return anything. For then this is no longer a Job event.