File: /home/imensosw/www/mpl.imenso.co/app/Listeners/BroadcastShowEnded.php
<?php
namespace App\Listeners;
use App\Events\RadioShowEnded;
use App\Models\RadioShow;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\Facades\View;
class BroadcastShowEnded
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param RadioShow $new_show
* @return void
*/
public function handle(RadioShowEnded $event)
{
$html[] = view('back-end/partials/radio-show-section')->with([
'current_show' => null,
])->render();
Broadcast::broadcast(
[
'radio_show',
],
'show-changed',
$html
);
}
}