Skip to content

Conversation

PetroZaburko
Copy link

In case if you use observer on model FilamentComment to send email notification with queue like this:

class CommentObserver
{
    public function created(FilamentComment $comment): void
    {
        if ($manager = $comment->user->manager) {
            Mail::to($manager)->queue(new CommentMail($comment));
        }
    }
}

you will catch an error:
local.ERROR: Cannot use "::class" on value of type null {"exception":"[object] (TypeError(code: 0): Cannot use \"::class\" on value of type null at .../vendor/parallax/filament-comments/src/Models/FilamentComment.php:28).

So, maybe it's better to set up variable $authenticatable from config file.

@luke-parallax luke-parallax merged commit 07d5ae5 into parallax:main Feb 13, 2024
@luke-parallax
Copy link
Collaborator

That's great thank you @PetroZaburko! This will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants