From 115068e57bbecc5ee6fd202b230c795fabff77be Mon Sep 17 00:00:00 2001 From: Toby Twigger Date: Wed, 7 Feb 2024 13:36:45 +0000 Subject: [PATCH] Clarify use of --reset and --smart-reset flags in documentation (#1494) * Update README.md Clarified model behaviour when using the --reset option * Add --smart-reset to the documentation --------- Co-authored-by: Toby Twigger --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e354271..bd00f5a 100644 --- a/README.md +++ b/README.md @@ -145,9 +145,9 @@ The class name will be different from the model, avoiding the IDE duplicate anno > Please make sure to back up your models, before writing the info. -Writing to the models should keep the existing comments and only append new properties/methods. -The existing PHPDoc is replaced, or added if not found. -With the `--reset (-R)` option, the existing PHPDocs are ignored, and only the newly found columns/relations are saved as PHPDocs. +Writing to the models should keep the existing comments and only append new properties/methods. It will not update changed properties/methods. + +With the `--reset (-R)` option, the whole existing PHPDoc is replaced, including any comments that have been made. The `--smart-reset` option will instead keep the 'text' part of the phpdoc comment, and just replace all the property/method defininitions. ```bash php artisan ide-helper:models "App\Models\Post"