2021-03-08 15:19:23 +01:00
|
|
|
<?php
|
|
|
|
|
2021-03-25 11:55:59 +01:00
|
|
|
namespace App\Events\Subscription;
|
2021-03-08 15:19:23 +01:00
|
|
|
|
|
|
|
use App\Models\Company;
|
2022-06-21 11:57:17 +02:00
|
|
|
use App\Models\Subscription;
|
2021-03-08 15:19:23 +01:00
|
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
2021-03-25 11:55:59 +01:00
|
|
|
class SubscriptionWasCreated
|
2021-03-08 15:19:23 +01:00
|
|
|
{
|
|
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
|
|
|
|
|
|
/**
|
2021-03-25 11:55:59 +01:00
|
|
|
* @var Subscription
|
2021-03-08 15:19:23 +01:00
|
|
|
*/
|
2021-03-25 11:55:59 +01:00
|
|
|
public $subscription;
|
2021-03-08 15:19:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var Company
|
|
|
|
*/
|
|
|
|
public $company;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public $event_vars;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new event instance.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2021-03-25 11:55:59 +01:00
|
|
|
public function __construct(Subscription $subscription, Company $company, array $event_vars)
|
2021-03-08 15:19:23 +01:00
|
|
|
{
|
2021-03-25 11:55:59 +01:00
|
|
|
$this->subscription = $subscription;
|
2021-03-08 15:19:23 +01:00
|
|
|
$this->company = $company;
|
|
|
|
$this->event_vars = $event_vars;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the channels the event should broadcast on.
|
|
|
|
*
|
|
|
|
* @return \Illuminate\Broadcasting\Channel|array
|
|
|
|
*/
|
2023-10-26 04:57:44 +02:00
|
|
|
public function broadcastOn()
|
|
|
|
{
|
2023-04-27 02:19:55 +02:00
|
|
|
return [];
|
2023-10-26 04:57:44 +02:00
|
|
|
}
|
2021-03-08 15:19:23 +01:00
|
|
|
}
|