| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App\Module\Article\Events;
- use App\Module\Article\Models\Article;
- use Illuminate\Broadcasting\InteractsWithSockets;
- use Illuminate\Foundation\Events\Dispatchable;
- use Illuminate\Queue\SerializesModels;
- /**
- * 文章浏览事件
- */
- class ArticleViewedEvent
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- /**
- * 文章模型
- *
- * @var Article
- */
- public Article $article;
- /**
- * 创建一个新的事件实例
- *
- * @param Article $article
- * @return void
- */
- public function __construct(Article $article)
- {
- $this->article = $article;
- }
- }
|