Download src/app/Events/ProductEvent.php from pnacorp/xsender: direct link, hf CLI and curl.
- Browser
- Download file 889 Bytes
-
https://huggingface.co/pnacorp/xsender/resolve/main/src/app/Events/ProductEvent.php
- Command line
-
hf download hf://pnacorp/xsender/src/app/Events/ProductEvent.php
-
curl -L -o ProductEvent.php https://huggingface.co/pnacorp/xsender/resolve/main/src/app/Events/ProductEvent.php
889 Bytes
| namespace App\Events; | |
| use Illuminate\Broadcasting\Channel; | |
| use Illuminate\Broadcasting\InteractsWithSockets; | |
| use Illuminate\Broadcasting\PresenceChannel; | |
| use Illuminate\Broadcasting\PrivateChannel; | |
| use Illuminate\Contracts\Broadcasting\ShouldBroadcast; | |
| use Illuminate\Foundation\Events\Dispatchable; | |
| use Illuminate\Queue\SerializesModels; | |
| use App\Models\Product; | |
| class ProductEvent | |
| { | |
| use Dispatchable, InteractsWithSockets, SerializesModels; | |
| /** | |
| * Create a new event instance. | |
| * | |
| * @return void | |
| */ | |
| public $product; | |
| public function __construct(Product $product) | |
| { | |
| $this->product = $product; | |
| } | |
| /** | |
| * Get the channels the event should broadcast on. | |
| * | |
| * @return \Illuminate\Broadcasting\Channel|array | |
| */ | |
| public function broadcastOn() | |
| { | |
| return new PrivateChannel('channel-name'); | |
| } | |
| } | |