From dd73a90f3a0b42b613e823df56721e7e90d7a24f Mon Sep 17 00:00:00 2001 From: Nipun Perera <3061001+wnipun@users.noreply.github.com> Date: Tue, 10 Jun 2025 20:43:46 +1000 Subject: [PATCH] Fix typo in documentation Corrected a typo in the documentation section explaining how Filament handles saving data to a BelongsTo relationship. The word "it it created" was changed to "it is created" for clarity. This ensures that readers understand the timing of observer hooks in relation to when relationships are attached. No changes were made to the technical content, only the wording was improved for accuracy and readability. --- packages/forms/docs/07-advanced.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forms/docs/07-advanced.md b/packages/forms/docs/07-advanced.md index 5e7fe04b87..aa2c0cae9e 100644 --- a/packages/forms/docs/07-advanced.md +++ b/packages/forms/docs/07-advanced.md @@ -560,7 +560,7 @@ Group::make() Please note that if you are saving the data to a `BelongsTo` relationship, then the foreign key column in your database must be `nullable()`. This is because Filament saves the form first, before saving the relationship. Since the form is saved first, the foreign ID does not exist yet, so it must be nullable. Immediately after the form is saved, Filament saves the relationship, which will then fill in the foreign ID and save it again. -It is worth noting that if you have an observer on your form model, then you may need to adapt it to ensure that it does not depend on the relationship existing when it it created. For example, if you have an observer that sends an email to a related record when a form is created, you may need to switch to using a different hook that runs after the relationship is attached, like `updated()`. +It is worth noting that if you have an observer on your form model, then you may need to adapt it to ensure that it does not depend on the relationship existing when it is created. For example, if you have an observer that sends an email to a related record when a form is created, you may need to switch to using a different hook that runs after the relationship is attached, like `updated()`. ### Conditionally saving data to a relationship