From ee6df692e55949ab90a19a72aaada94f2a1e31ee Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Thu, 1 Apr 2021 20:49:57 +0200 Subject: [PATCH] Update README to promote the post_discover hook --- README.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c227fe786..f2c78fd74 100644 --- a/README.md +++ b/README.md @@ -87,16 +87,13 @@ Note: `bootstrap/compiled.php` has to be cleared first, so run `php artisan clea This will generate the file `_ide_helper.php` which is expected to be additionally parsed by your IDE for autocomplete. You can use the config `filename` to change its name. -You can configure your `composer.json` to do this each time you update your dependencies: - -```js -"scripts": { - "post-update-cmd": [ - "Illuminate\\Foundation\\ComposerScripts::postUpdate", - "@php artisan ide-helper:generate", - "@php artisan ide-helper:meta" - ] -}, +You can use the `post_discover` config to run any artisan commands after installing/update packages: + +```php +'post_discover' => [ + 'ide-helper:generate', + 'ide-helper:meta', +], ``` You can also publish the config file to change implementations (ie. interface to specific class) or set defaults for `--helpers`.