| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace App\Module\Farm\Events;
- use Illuminate\Broadcasting\InteractsWithSockets;
- use Illuminate\Foundation\Events\Dispatchable;
- use Illuminate\Queue\SerializesModels;
- /**
- * 土地创建事件
- *
- * 当新土地被创建时触发此事件
- */
- class LandCreatedEvent
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- /**
- * 用户ID
- *
- * @var int
- */
- public $userId;
- /**
- * 土地ID
- *
- * @var int
- */
- public $landId;
- /**
- * 创建一个新的事件实例
- *
- * @param int $userId 用户ID
- * @param int $landId 土地ID
- * @return void
- */
- public function __construct(int $userId, int $landId)
- {
- $this->userId = $userId;
- $this->landId = $landId;
- }
- }
|