Extending Laravel Homestead
Published on by Eric L. Barnes
As simple as Homestead is, I still needed to add some additional dependencies required by VideoManager. I would be awesome if you could add additional dependencies to the Homestead.yaml file, or even just a pointer to my own shell script, but for now, I just created a script inside the root of one of my apps to run after the initial vagrant up and after any subsequent vagrant destroy && vagrant up. This provides a simple way to add some additional packages like php5-ldap, oh-my-zsh, and the PHP oracle driver. Simply log in to the VM and run the script as root when needed: sudo ./homestead_extras.sh
This is a nice tip if you are having to install a lot of additional stuff. I would personally wrap this in a local Envoy task. But everyone has their preferences.
Eric is the creator of Laravel News and has been covering Laravel since 2012.