Skip to content

Commit

Permalink
Update README to promote the post_discover hook
Browse files Browse the repository at this point in the history
  • Loading branch information
mfn authored and netpok committed Mar 2, 2022
1 parent 30fba87 commit 6359d9a
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,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`.
Expand Down

0 comments on commit 6359d9a

Please sign in to comment.