Issues (22)

src/Events/CommentAdded.php (1 issue)

Severity
1
<?php
2
3
namespace WebDevEtc\BlogEtc\Events;
4
5
use Illuminate\Foundation\Events\Dispatchable;
6
use Illuminate\Queue\SerializesModels;
7
use WebDevEtc\BlogEtc\Models\Comment;
8
use WebDevEtc\BlogEtc\Models\Post;
9
10
/**
11
 * Class CommentAdded.
12
 */
13
class CommentAdded
14
{
15
    use Dispatchable;
16
    use SerializesModels;
0 ignored issues
show
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by WebDevEtc\BlogEtc\Events\CommentAdded: $id, $relations, $class, $connection, $keyBy
Loading history...
17
18
    /** @var Post */
19
    public $blogEtcPost;
20
    /** @var Comment */
21
    public $newComment;
22
23
    public function __construct(Post $post, Comment $newComment)
24
    {
25
        $this->blogEtcPost = $post;
26
        $this->newComment = $newComment;
27
    }
28
}
29