'member', // Uses morph map alias 'notable_id' => Member::factory(), 'content' => $this->faker->paragraph(), 'author_user_id' => User::factory(), ]; } /** * Set the note to belong to a specific member */ public function forMember(Member $member): static { return $this->state(fn () => [ 'notable_type' => 'member', 'notable_id' => $member->id, ]); } /** * Set the note to be authored by a specific user */ public function byAuthor(User $user): static { return $this->state(fn () => [ 'author_user_id' => $user->id, ]); } }