From e42afefa36e1a02d65650ab155999eb2b8c0d6cb Mon Sep 17 00:00:00 2001 From: Paul McKay Date: Wed, 20 Dec 2023 17:11:52 +0000 Subject: [PATCH] update README , re the mailable --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/README.md b/README.md index 2866139..e8aabb5 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,67 @@ php artisan vendor:publish --tag="filament-invite-views" use Concept7\FilamentInvite\Models\Traits\Invitable; ``` +### Create a mailable + +In app/Mail, create SendInviteMail.php, e.g. + +``` +user->email, + subject: 'You are invited to join ' . config('app.name'), + ); + } + + /** + * Get the message content definition. + */ + public function content(): Content + { + return new Content( + markdown: 'filament-invite::mail.invite', + with: [ + 'user' => $this->user, + 'link' => $this->url, + ] + ); + } +} +``` + ### Event listener If for some reason you need to listen to the InviteAccepted Event, you can register a listener handling a InviteProcessedEvent. Register the listener in your EventServiceProvider.