123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace App\Events;
- use App\Models\Admin;
- use Illuminate\Broadcasting\Channel;
- use Illuminate\Queue\SerializesModels;
- use Illuminate\Broadcasting\PrivateChannel;
- use Illuminate\Broadcasting\PresenceChannel;
- use Illuminate\Foundation\Events\Dispatchable;
- use Illuminate\Broadcasting\InteractsWithSockets;
- use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
- class DeleteService
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- /**
- * Create a new event instance.
- *
- * @return void
- */
- public $admin;
- public function __construct(Admin $admin)
- {
- $this->admin=$admin;
- }
- /**
- * Get the channels the event should broadcast on.
- *
- * @return \Illuminate\Broadcasting\Channel|array
- */
- public function broadcastOn()
- {
- return new PrivateChannel('channel-name');
- }
- }
|