laravel-ide-facades-helper maintained by dragon-code
Laravel IDE Facade Helper
Laravel IDE Facade Helper, generates correct PHPDocs for your Facade classes, to improve auto-completion.
Note This package has been deprecated. Use the Laravel Idea plugin instead.
Installation
Require this package with composer using the following command:
$ composer require dragon-code/laravel-ide-facades-helper --dev
This package makes use of Laravels package auto-discovery mechanism, which means if you don't install dev dependencies in production, it also won't be loaded.
If for some reason you want manually control this:
- add the package to the
extra.laravel.dont-discoverkey incomposer.json, e.g."extra": { "laravel": { "dont-discover": [ "dragon-code/laravel-ide-facades-helper", ] } } - Add the following class to the
providersarray inconfig/app.php:
If you want to manually load it only in non-production environments, instead you can add this to yourDragonCode\LaravelIdeFacadesHelper\ServiceProvider::class,AppServiceProviderwith theregister()method:public function register() { if ($this->app->environment() !== 'production') { $this->app->register(\DragonCode\LaravelIdeFacadesHelper\ServiceProvider::class); } // ... }
Note: Avoid caching the configuration in your development environment, it may cause issues after installing this package; respectively clear the cache beforehand via
php artisan cache:clearif you encounter problems when running the commands
Usage
php artisan ide-helper:facades- PHPDoc generation for your Facades
You can generate helpers for your facades.
You will find additional settings in the options facade_locations and facades_visibility of the config/ide-helper.php file.
Note: The package uses the same file as barryvdh/laravel-ide-helper. Therefore, if you need to redefine the paths, add the configuration from this file to it.
License
This package is licensed under the MIT License.