INTRODUCTION:
Hello, fellow developers. What’s up?, I hope you are doing fine. In this extended tutorial, we will learn how to install laravel ide helper.
Laravel IDE Helper Installation:
At first, we will install our package using the below composer command. copy & paste the following into your terminal and hit enter from your keyboard.
composer require --dev barryvdh/laravel-ide-helper
Quick Note: If you experience version conflicts with doctrine/dbal, please try the below command.
composer require --dev barryvdh/laravel-ide-helper --with-all-dependencies
Laravel IDE Helper Modify Package Discovery:
You may want to control or enable/disable package discovery. Then copy & paste the below code snippet into your composer.json file.
"extra": {
"laravel": {
"dont-discover": [
"barryvdh/laravel-ide-helper"
]
}
}
Configuring Config.php File:
Please add this below line to your provider array of config.php files.
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
Also, you can load/unload the Laravel IDE Helper Service Provider by adding the below code in your AppServiceProvider>register function.
public function register()
{
if ($this->app->isLocal()) {
$this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
}
}
PHPDoc generation for Laravel Facades:
Please follow the below command to generate automatic laravel facades. Copy & paste the following command into your terminal and hit enter from your keyboard.
php artisan ide-helper:generate
PHPDocs generation for Laravel Models:
Please follow the below command to generate automatic laravel facades. Again please copy & paste the following command into your terminal and hit enter from your keyboard.
php artisan ide-helper:models
You can learn more from their documentation.
CONCLUSION:
Finished! That’s all about our tutorial. I’ve tried to teach you the most updated & tested things in this tutorial. Thank you so much for reading the whole tutorial from the beginning. If this tutorial helps you a little bit, then remember to share this post on social media. If you have questions, suggestions, or tips regarding this post, let us know via our Contact Us page.