mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 22:24:34 -04:00
* Fixes when implementing * php_cs * Clean up * Clean up * Working on adjusting ledger when an invoice is deleted
57 lines
1.3 KiB
PHP
57 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
*
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
*
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
*
|
|
* @license https://opensource.org/licenses/AAL
|
|
*/
|
|
|
|
namespace App\Listeners;
|
|
|
|
use App\Libraries\MultiDB;
|
|
use App\Notifications\Ninja\VerifyUser;
|
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use Illuminate\Support\Facades\Mail;
|
|
use App\Utils\Ninja;
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class SendVerificationNotification implements ShouldQueue
|
|
{
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
|
|
/**
|
|
* Create the event listener.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the event.
|
|
*
|
|
* @param object $event
|
|
* @return void
|
|
*/
|
|
public function handle($event)
|
|
{
|
|
MultiDB::setDB($event->company->db);
|
|
|
|
try {
|
|
$event->user->notify(new VerifyUser($event->user));
|
|
|
|
Ninja::registerNinjaUser($event->user);
|
|
} catch (\Exception $e) {
|
|
}
|
|
}
|
|
}
|