1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 05:32:39 +01:00
invoiceninja/app/Services/Notification/NotificationService.php
David Bomba 3d31f810c0
Set Invitations as a default include for invoices (#3362)
* 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
2020-02-24 21:15:30 +11:00

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);
}
}