Issues (22)

src/Events/CommentApproved.php (1 issue)

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