Last active
September 18, 2019 13:06
-
-
Save Michael-Stokoe/d5f0ed97758504def251bb238e3fefb2 to your computer and use it in GitHub Desktop.
idehelper function for .bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to your ~/.bashrc or ~/.zshrc or similar | |
function idehelper() { | |
if [ -f artisan ]; then | |
echo "Pulling in BarryVDH's Laravel-IDE-Helper..." | |
composer require --dev barryvdh/laravel-ide-helper | |
echo "Generating IDE-Helper files..." | |
php artisan ide-helper:generate | |
php artisan ide-helper:meta | |
php artisan ide-helper:models | |
echo "Finished setting up Laravel-IDE-Helper!" | |
fi | |
} | |
# Now running "idehelper" from your project's root folder will pull in BarryVDH's Laravel IDE-Helper. | |
# which not only generates files for PHP Storm's autocompletion to work properly with Laravel, it also works for | |
# Visual Studio Code, you can find an extensions repository with all the stuff you'll need for Laravel Development | |
# In my other repositories. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment