2018-10-04 20:10:43 +03:00
|
|
|
<?php
|
2019-05-11 13:32:07 +10:00
|
|
|
/**
|
|
|
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
|
|
|
*
|
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
|
*
|
2020-01-07 11:13:47 +11:00
|
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
2019-05-11 13:32:07 +10:00
|
|
|
*
|
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
|
*/
|
2018-10-04 20:10:43 +03:00
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
2019-04-20 11:19:43 +10:00
|
|
|
use App\Events\Client\ClientWasCreated;
|
2020-03-09 21:05:23 +01:00
|
|
|
use App\Events\Company\CompanyWasDeleted;
|
2019-07-10 11:50:49 +10:00
|
|
|
use App\Events\Contact\ContactLoggedIn;
|
2020-03-03 20:44:26 +11:00
|
|
|
use App\Events\Credit\CreditWasMarkedSent;
|
2020-04-09 09:35:40 +10:00
|
|
|
use App\Events\Invoice\InvoiceWasCancelled;
|
2019-05-15 15:03:18 +10:00
|
|
|
use App\Events\Invoice\InvoiceWasCreated;
|
2020-04-04 21:32:42 +11:00
|
|
|
use App\Events\Invoice\InvoiceWasDeleted;
|
2019-12-22 21:28:41 +11:00
|
|
|
use App\Events\Invoice\InvoiceWasEmailed;
|
2019-04-24 11:49:41 +10:00
|
|
|
use App\Events\Invoice\InvoiceWasMarkedSent;
|
2019-11-20 16:41:49 +11:00
|
|
|
use App\Events\Invoice\InvoiceWasPaid;
|
2020-04-09 09:35:40 +10:00
|
|
|
use App\Events\Invoice\InvoiceWasReversed;
|
2019-05-15 15:03:18 +10:00
|
|
|
use App\Events\Invoice\InvoiceWasUpdated;
|
2020-03-04 22:09:43 +11:00
|
|
|
use App\Events\Misc\InvitationWasViewed;
|
2019-05-13 16:18:46 +10:00
|
|
|
use App\Events\Payment\PaymentWasCreated;
|
2019-11-19 21:23:56 +11:00
|
|
|
use App\Events\Payment\PaymentWasDeleted;
|
2020-02-20 07:44:12 +11:00
|
|
|
use App\Events\Payment\PaymentWasRefunded;
|
|
|
|
|
use App\Events\Payment\PaymentWasVoided;
|
2019-06-04 07:46:46 +10:00
|
|
|
use App\Events\User\UserLoggedIn;
|
2019-06-12 14:22:05 +10:00
|
|
|
use App\Events\User\UserWasCreated;
|
2020-03-24 20:15:30 +11:00
|
|
|
use App\Events\User\UserWasDeleted;
|
2019-05-13 16:18:46 +10:00
|
|
|
use App\Listeners\Activity\CreatedClientActivity;
|
2019-05-15 15:03:18 +10:00
|
|
|
use App\Listeners\Activity\PaymentCreatedActivity;
|
2019-11-19 21:23:56 +11:00
|
|
|
use App\Listeners\Activity\PaymentDeletedActivity;
|
2020-02-20 07:44:12 +11:00
|
|
|
use App\Listeners\Activity\PaymentRefundedActivity;
|
|
|
|
|
use App\Listeners\Activity\PaymentVoidedActivity;
|
2019-07-10 11:50:49 +10:00
|
|
|
use App\Listeners\Contact\UpdateContactLastLogin;
|
2020-03-09 21:05:23 +01:00
|
|
|
use App\Listeners\Document\DeleteCompanyDocuments;
|
2019-05-15 15:19:18 +10:00
|
|
|
use App\Listeners\Invoice\CreateInvoiceActivity;
|
2019-11-20 16:41:49 +11:00
|
|
|
use App\Listeners\Invoice\CreateInvoiceHtmlBackup;
|
2019-09-23 13:10:51 +10:00
|
|
|
use App\Listeners\Invoice\CreateInvoiceInvitation;
|
2019-08-29 14:07:04 +10:00
|
|
|
use App\Listeners\Invoice\CreateInvoicePdf;
|
2020-04-09 09:35:40 +10:00
|
|
|
use App\Listeners\Invoice\InvoiceDeletedActivity;
|
2019-12-22 21:28:41 +11:00
|
|
|
use App\Listeners\Invoice\InvoiceEmailActivity;
|
|
|
|
|
use App\Listeners\Invoice\InvoiceEmailFailedActivity;
|
2020-03-04 22:09:43 +11:00
|
|
|
use App\Listeners\Invoice\InvoiceEmailedNotification;
|
2019-05-15 15:19:18 +10:00
|
|
|
use App\Listeners\Invoice\UpdateInvoiceActivity;
|
2019-10-02 08:44:13 +10:00
|
|
|
use App\Listeners\Invoice\UpdateInvoiceInvitations;
|
2020-03-04 22:09:43 +11:00
|
|
|
use App\Listeners\Misc\InvitationViewedListener;
|
2020-03-02 21:22:37 +11:00
|
|
|
use App\Listeners\Payment\PaymentNotification;
|
2018-10-24 14:50:15 +11:00
|
|
|
use App\Listeners\SendVerificationNotification;
|
2020-02-24 21:15:30 +11:00
|
|
|
use App\Listeners\SetDBListener;
|
2020-03-24 20:15:30 +11:00
|
|
|
use App\Listeners\User\DeletedUserActivity;
|
2019-06-04 07:46:46 +10:00
|
|
|
use App\Listeners\User\UpdateUserLastLogin;
|
2018-10-04 20:10:43 +03:00
|
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The event listener mappings for the application.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $listen = [
|
2020-02-05 15:06:03 +11:00
|
|
|
\Codedge\Updater\Events\UpdateAvailable::class => [
|
|
|
|
|
\Codedge\Updater\Listeners\SendUpdateAvailableNotification::class
|
|
|
|
|
], // [3]
|
|
|
|
|
\Codedge\Updater\Events\UpdateSucceeded::class => [
|
|
|
|
|
\Codedge\Updater\Listeners\SendUpdateSucceededNotification::class
|
2020-03-09 21:05:23 +01:00
|
|
|
],
|
2019-06-12 14:22:05 +10:00
|
|
|
UserWasCreated::class => [
|
2018-10-24 14:50:15 +11:00
|
|
|
SendVerificationNotification::class,
|
2019-04-20 11:19:43 +10:00
|
|
|
],
|
2020-03-24 20:15:30 +11:00
|
|
|
UserWasDeleted::class => [
|
|
|
|
|
DeletedUserActivity::class,
|
|
|
|
|
],
|
2019-06-04 07:46:46 +10:00
|
|
|
UserLoggedIn::class => [
|
|
|
|
|
UpdateUserLastLogin::class,
|
|
|
|
|
],
|
2019-07-10 11:50:49 +10:00
|
|
|
ContactLoggedIn::class => [
|
|
|
|
|
UpdateContactLastLogin::class,
|
|
|
|
|
],
|
2019-04-20 11:19:43 +10:00
|
|
|
// Clients
|
|
|
|
|
ClientWasCreated::class => [
|
2019-04-21 22:28:28 +10:00
|
|
|
CreatedClientActivity::class,
|
2019-04-21 22:24:26 +10:00
|
|
|
// 'App\Listeners\SubscriptionListener@createdClient',
|
2019-04-20 11:19:43 +10:00
|
|
|
],
|
2019-05-13 16:18:46 +10:00
|
|
|
PaymentWasCreated::class => [
|
|
|
|
|
PaymentCreatedActivity::class,
|
2020-03-02 21:22:37 +11:00
|
|
|
PaymentNotification::class,
|
2019-05-13 16:18:46 +10:00
|
|
|
],
|
2019-11-19 21:23:56 +11:00
|
|
|
PaymentWasDeleted::class => [
|
2019-11-20 16:41:49 +11:00
|
|
|
PaymentDeletedActivity::class,
|
2019-11-19 21:23:56 +11:00
|
|
|
],
|
2020-02-20 07:44:12 +11:00
|
|
|
PaymentWasRefunded::class => [
|
|
|
|
|
PaymentRefundedActivity::class,
|
|
|
|
|
],
|
|
|
|
|
PaymentWasVoided::class => [
|
|
|
|
|
PaymentVoidedActivity::class,
|
|
|
|
|
],
|
2019-04-20 11:19:43 +10: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 11:49:41 +10:00
|
|
|
|
2020-03-03 20:44:26 +11:00
|
|
|
CreditWasMarkedSent::class => [
|
|
|
|
|
],
|
2020-03-09 21:05:23 +01:00
|
|
|
|
2020-03-03 20:44:26 +11:00
|
|
|
//Invoices
|
2019-04-24 15:18:48 +10:00
|
|
|
InvoiceWasMarkedSent::class => [
|
2019-11-20 16:41:49 +11:00
|
|
|
CreateInvoiceHtmlBackup::class,
|
2019-05-15 15:03:18 +10:00
|
|
|
],
|
|
|
|
|
InvoiceWasUpdated::class => [
|
2019-05-15 15:19:18 +10:00
|
|
|
UpdateInvoiceActivity::class,
|
2019-08-29 14:07:04 +10:00
|
|
|
CreateInvoicePdf::class,
|
2019-05-15 15:03:18 +10:00
|
|
|
],
|
|
|
|
|
InvoiceWasCreated::class => [
|
2019-05-15 15:19:18 +10:00
|
|
|
CreateInvoiceActivity::class,
|
2020-02-15 20:06:30 +11:00
|
|
|
// CreateInvoicePdf::class,
|
2019-04-24 11:49:41 +10:00
|
|
|
],
|
2019-11-20 16:41:49 +11:00
|
|
|
InvoiceWasPaid::class => [
|
|
|
|
|
CreateInvoiceHtmlBackup::class,
|
2019-12-22 21:28:41 +11:00
|
|
|
],
|
|
|
|
|
InvoiceWasEmailed::class => [
|
|
|
|
|
InvoiceEmailActivity::class,
|
2020-03-04 22:09:43 +11:00
|
|
|
InvoiceEmailedNotification::class,
|
2019-12-22 21:28:41 +11:00
|
|
|
],
|
|
|
|
|
InvoiceWasEmailedAndFailed::class => [
|
|
|
|
|
InvoiceEmailFailedActivity::class,
|
|
|
|
|
],
|
2020-04-04 21:32:42 +11:00
|
|
|
InvoiceWasDeleted::class => [
|
2020-04-09 09:35:40 +10:00
|
|
|
InvoiceDeletedActivity::class,
|
|
|
|
|
],
|
|
|
|
|
InvoiceWasReversed::class => [
|
|
|
|
|
],
|
|
|
|
|
InvoiceWasCancelled::class => [
|
2020-04-04 21:32:42 +11:00
|
|
|
],
|
2020-03-04 22:09:43 +11:00
|
|
|
InvitationWasViewed::class => [
|
2020-03-09 21:05:23 +01:00
|
|
|
InvitationViewedListener::class
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
CompanyWasDeleted::class => [
|
|
|
|
|
DeleteCompanyDocuments::class,
|
2020-03-04 22:09:43 +11:00
|
|
|
],
|
2018-10-21 09:26:21 +11:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The subscriber classes to register.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $subscribe = [
|
|
|
|
|
|
2018-10-04 20:10:43 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register any events for your application.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2020-03-28 22:34:04 +11:00
|
|
|
// public function boot()
|
|
|
|
|
// {
|
|
|
|
|
// parent::boot();
|
|
|
|
|
// }
|
|
|
|
|
|
2019-06-05 10:43:23 +10:00
|
|
|
public function boot()
|
2020-04-04 21:32:42 +11:00
|
|
|
{
|
|
|
|
|
parent::boot();
|
|
|
|
|
}
|
2018-10-04 20:10:43 +03:00
|
|
|
}
|