Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/app/Listeners/SendEventTenantNotification.php
Назад
<?php namespace App\Listeners; use App\Events\EventCreateEvent; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\InteractsWithQueue; use App\Repositories\NotificationRepository; use App\Interfaces\NotificationRepositoryInterface; use App\Models\User; class SendEventTenantNotification { public NotificationRepositoryInterface $notificationInterfaceObj; /** * Create the event listener. */ public function __construct(NotificationRepository $notifRepo) { $this->notificationInterfaceObj = $notifRepo; } /** * Handle the event. */ public function handle(EventCreateEvent $event): void { if(!empty($event->tenant)){ $tenant = User::whereId($event->tenant->tenant_user_id)->first(); $title = 'Event Created'; $message = 'Your landlord '.$event->landlord->name.' has created an event named: '.$event->event_title.', on the Date '.$event->event_date.'.'; $fl = $this->notificationInterfaceObj->CreateAndSendNotification($tenant,$title,$message); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка