2018-10-04 19:10:43 +02:00
|
|
|
<?php
|
2019-05-11 05:32:07 +02:00
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
2018-10-04 19:10:43 +02:00
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2019-04-20 03:19:43 +02:00
|
|
|
use App\Events\Client\ClientWasCreated;
|
2019-07-10 03:50:49 +02:00
|
|
|
use App\Events\Contact\ContactLoggedIn;
|
2019-05-15 07:03:18 +02:00
|
|
|
use App\Events\Invoice\InvoiceWasCreated;
|
2019-04-24 03:49:41 +02:00
|
|
|
use App\Events\Invoice\InvoiceWasMarkedSent;
|
2019-05-15 07:03:18 +02:00
|
|
|
use App\Events\Invoice\InvoiceWasUpdated;
|
2019-05-13 08:18:46 +02:00
|
|
|
use App\Events\Payment\PaymentWasCreated;
|
2019-06-03 23:46:46 +02:00
|
|
|
use App\Events\User\UserLoggedIn;
|
2019-06-12 06:22:05 +02:00
|
|
|
use App\Events\User\UserWasCreated;
|
2019-05-13 08:18:46 +02:00
|
|
|
use App\Listeners\Activity\CreatedClientActivity;
|
2019-05-15 07:03:18 +02:00
|
|
|
use App\Listeners\Activity\PaymentCreatedActivity;
|
2019-07-10 03:50:49 +02:00
|
|
|
use App\Listeners\Contact\UpdateContactLastLogin;
|
2019-05-15 07:19:18 +02:00
|
|
|
use App\Listeners\Invoice\CreateInvoiceActivity;
|
2019-09-23 05:10:51 +02:00
|
|
|
use App\Listeners\Invoice\CreateInvoiceInvitation;
|
2019-08-29 06:07:04 +02:00
|
|
|
use App\Listeners\Invoice\CreateInvoicePdf;
|
2019-05-15 07:19:18 +02:00
|
|
|
use App\Listeners\Invoice\UpdateInvoiceActivity;
|
2019-10-02 00:44:13 +02:00
|
|
|
use App\Listeners\Invoice\UpdateInvoiceInvitations;
|
2019-10-01 03:56:48 +02:00
|
|
|
use App\Listeners\Invoice\UpdateInvoicePayment;
|
2018-10-24 05:50:15 +02:00
|
|
|
use App\Listeners\SendVerificationNotification;
|
2019-06-03 23:46:46 +02:00
|
|
|
use App\Listeners\User\UpdateUserLastLogin;
|
2018-10-04 19:10:43 +02:00
|
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The event listener mappings for the application.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $listen = [
|
2019-06-12 06:22:05 +02:00
|
|
|
UserWasCreated::class => [
|
2018-10-24 05:50:15 +02:00
|
|
|
SendVerificationNotification::class,
|
2019-04-20 03:19:43 +02:00
|
|
|
],
|
2019-06-03 23:46:46 +02:00
|
|
|
UserLoggedIn::class => [
|
|
|
|
UpdateUserLastLogin::class,
|
|
|
|
],
|
2019-07-10 03:50:49 +02:00
|
|
|
ContactLoggedIn::class => [
|
|
|
|
UpdateContactLastLogin::class,
|
|
|
|
],
|
2019-04-20 03:19:43 +02:00
|
|
|
// Clients
|
|
|
|
ClientWasCreated::class => [
|
2019-04-21 14:28:28 +02:00
|
|
|
CreatedClientActivity::class,
|
2019-04-21 14:24:26 +02:00
|
|
|
// 'App\Listeners\SubscriptionListener@createdClient',
|
2019-04-20 03:19:43 +02:00
|
|
|
],
|
2019-05-13 08:18:46 +02:00
|
|
|
PaymentWasCreated::class => [
|
|
|
|
PaymentCreatedActivity::class,
|
2019-10-03 13:50:50 +02:00
|
|
|
//UpdateInvoicePayment::class,
|
2019-10-02 00:44:13 +02:00
|
|
|
UpdateInvoiceInvitations::class,
|
2019-05-13 08:18:46 +02:00
|
|
|
],
|
2019-04-20 03:19:43 +02:00
|
|
|
'App\Events\ClientWasArchived' => [
|
|
|
|
'App\Listeners\ActivityListener@archivedClient',
|
|
|
|
],
|
|
|
|
'App\Events\ClientWasUpdated' => [
|
|
|
|
'App\Listeners\SubscriptionListener@updatedClient',
|
|
|
|
],
|
|
|
|
'App\Events\ClientWasDeleted' => [
|
|
|
|
'App\Listeners\ActivityListener@deletedClient',
|
|
|
|
'App\Listeners\SubscriptionListener@deletedClient',
|
|
|
|
'App\Listeners\HistoryListener@deletedClient',
|
|
|
|
],
|
|
|
|
'App\Events\ClientWasRestored' => [
|
|
|
|
'App\Listeners\ActivityListener@restoredClient',
|
|
|
|
],
|
2019-04-24 03:49:41 +02:00
|
|
|
|
|
|
|
//Invoices
|
2019-05-15 07:03:18 +02:00
|
|
|
|
2019-04-24 07:18:48 +02:00
|
|
|
InvoiceWasMarkedSent::class => [
|
2019-09-23 05:10:51 +02:00
|
|
|
CreateInvoiceInvitation::class,
|
2019-05-15 07:03:18 +02:00
|
|
|
],
|
|
|
|
InvoiceWasUpdated::class => [
|
2019-05-15 07:19:18 +02:00
|
|
|
UpdateInvoiceActivity::class,
|
2019-08-29 06:07:04 +02:00
|
|
|
CreateInvoicePdf::class,
|
2019-05-15 07:03:18 +02:00
|
|
|
],
|
|
|
|
InvoiceWasCreated::class => [
|
2019-05-15 07:19:18 +02:00
|
|
|
CreateInvoiceActivity::class,
|
2019-08-29 06:07:04 +02:00
|
|
|
CreateInvoicePdf::class,
|
2019-04-24 03:49:41 +02:00
|
|
|
],
|
2018-10-21 00:26:21 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The subscriber classes to register.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $subscribe = [
|
|
|
|
|
2018-10-04 19:10:43 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register any events for your application.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2019-06-05 02:43:23 +02:00
|
|
|
public function boot()
|
2018-10-04 19:10:43 +02:00
|
|
|
{
|
|
|
|
|
2019-06-05 02:43:23 +02:00
|
|
|
parent::boot();
|
2019-06-03 23:46:46 +02:00
|
|
|
|
2018-10-04 19:10:43 +02:00
|
|
|
}
|
|
|
|
}
|