Barryvdh laravel ide helper install on every new laravel project

To install Barryvdh Laravel IDE Helper on every new Laravel project, you can add a custom command to your Laravel project's composer.json file.

Here's an example of how you can do this:

  1. Open your composer.json file and add the following code to the scripts section:

    "scripts": {
     "post-create-project-cmd": [
         "Illuminate\\Foundation\\ComposerScripts::postCreateProject",
         "php artisan ide-helper:install"
     ]
    },

    This will run the ide-helper:install command after the Laravel project is created.

  2. Save the composer.json file and run the following command in your terminal:

    composer dump-autoload

    This will update the Composer autoloader.

  3. Now, whenever you create a new Laravel project using Composer, the ide-helper:install command will be run automatically, and Barryvdh Laravel IDE Helper will be installed.

Note: Make sure you have Barryvdh Laravel IDE Helper installed globally on your system by running composer global require barryvdh/laravel-ide-helper before creating a new Laravel project.

Also, if you want to install Barryvdh Laravel IDE Helper only for a specific Laravel project, you can add the following code to the composer.json file of that project:

"require-dev": {
    "barryvdh/laravel-ide-helper": "^2.5"
},

Then, run composer install to install the package.