| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace App\Events;
- use App\OwnerLogisticFeeDetail;
- use App\OwnerStoreFeeDetail;
- use App\OwnerStoreOutFeeDetail;
- use App\OwnerWayBillFeeDetail;
- 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;
- class SettlementBillCreateEvent
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- //快递费
- const OWNER_LOGISTIC_FEE_DETAIL = OwnerLogisticFeeDetail::class;
- //入库费
- const OWNER_STORE_FEE_DETAIL = OwnerStoreFeeDetail::class;
- //出库
- const OWNER_STORE_OUT_FEE_DETAIL = OwnerStoreOutFeeDetail::class;
- //物流费
- const OWNER_WAY_BILL_FEE_DETAIL = OwnerWayBillFeeDetail::class;
- public $createData;
- /**
- * OWNER_LOGISTIC_FEE_DETAIL
- * OWNER_STORE_FEE_DETAIL
- * OWNER_STORE_OUT_FEE_DETAIL
- * OWNER_WAY_BILL_FEE_DETAIL
- */
- public $modelName;
- /**
- * SettlementBillCreateEvent constructor.
- * @param array $createData
- * @param string $modelName
- */
- public function __construct(array $createData, string $modelName)
- {
- $this->createData = $createData;
- $this->modelName = $modelName;
- }
- /**
- * Get the channels the event should broadcast on.
- *
- * @return \Illuminate\Broadcasting\Channel|array
- */
- public function broadcastOn()
- {
- return new PrivateChannel('channel-name');
- }
- }
|