1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 08:51:34 +02:00
invoiceninja/app/Events/User/UserWasRestored.php

62 lines
1.4 KiB
PHP
Raw Normal View History

2019-04-25 12:21:07 +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) 2020. Invoice Ninja LLC (https://invoiceninja.com)
2019-05-11 05:32:07 +02:00
*
* @license https://opensource.org/licenses/AAL
*/
2019-04-25 12:21:07 +02:00
namespace App\Events\User;
2020-07-08 14:02:16 +02:00
use App\Models\Company;
use App\Models\User;
2019-04-25 12:21:07 +02:00
use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
2020-07-08 14:02:16 +02:00
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
2019-04-25 12:21:07 +02:00
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
2020-07-08 14:02:16 +02:00
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
2019-04-25 12:21:07 +02:00
/**
* Class UserWasRestored
* @package App\Events\User
*/
class UserWasRestored
{
use Dispatchable, InteractsWithSockets, SerializesModels;
/**
* @var $user
*/
public $user;
public $company;
2020-07-08 14:02:16 +02:00
public $event_vars;
2019-04-25 12:21:07 +02:00
/**
* Create a new event instance.
*
* @return void
*/
2020-07-08 14:02:16 +02:00
public function __construct(User $user, Company $company, array $event_vars)
2019-04-25 12:21:07 +02:00
{
$this->user = $user;
$this->company = $company;
2020-07-08 14:02:16 +02:00
$this->event_vars = $event_vars;
2019-04-25 12:21:07 +02:00
}
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
*/
public function broadcastOn()
{
return new PrivateChannel('channel-name');
}
}