snipe-it/app/Providers/EventServiceProvider.php
Martin Meredith f403db274a (develop) Fix asset auto-incrementation (#6806)
* Fix auto-increment not updating

This is due to the addition of caching for settings.  If we're not
explicitly saving the Settings model, then the cache isn't getting
updated, causing the asset tag auto-increment to get an old cached
version with the wrong number

* Move Setting cache clear to an observer
2019-03-13 10:58:35 -07:00

36 lines
764 B
PHP

<?php
namespace App\Providers;
use App\Listeners\CheckoutableListener;
use App\Listeners\LogListener;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
'Illuminate\Auth\Events\Login' => [
'App\Listeners\LogSuccessfulLogin',
],
'Illuminate\Auth\Events\Failed' => [
'App\Listeners\LogFailedLogin',
],
];
/**
* The subscriber classes to register.
*
* @var array
*/
protected $subscribe = [
LogListener::class,
CheckoutableListener::class
];
}