mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
3d31f810c0
* Working on importing company gateways * Fix for companyuser settings object * Migrate client_gateway_tokens * Working on Notificaitons * Working on notifications * Failsafe for user-company * unlink files * Set DB for jobs * Always have a fallback for company_id * Fixes for user model * Formatting for MultiDB * Working on Company Ledger Tests * Fixes for contact request * Set Invitations as a default include for invoices
43 lines
853 B
PHP
43 lines
853 B
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\Services\Notification;
|
|
|
|
use App\Models\Company;
|
|
use App\Services\AbstractService;
|
|
use Illuminate\Notifications\Notification as Notifiable;
|
|
use Illuminate\Support\Facades\Notification;
|
|
|
|
class NotificationService extends AbstractService
|
|
{
|
|
|
|
public $company;
|
|
|
|
public $notification;
|
|
|
|
public function __construct(Company $company, Notifiable $notification)
|
|
{
|
|
|
|
$this->company = $company;
|
|
|
|
$this->notification = $notification;
|
|
|
|
}
|
|
|
|
public function run()
|
|
{
|
|
|
|
$this->company->owner()->notify($this->notification);
|
|
|
|
}
|
|
|
|
}
|