Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mike Bronner:
Run #AllTheCommands Outside of Homestead
Mar 04, 2015 @ 10:02:49

In this new post Mike Bronner shows you how to get the latest PHP5 and Mcrypt versions installed on OS X Yosemite to make ti easier on developers needing to run commands outside of Homestead.

Laravel Homestead has brought virtual machines for web development to the mainstream PHP developer: it makes setting up a development stack similar to XAMP extremely simple. [...] However, one of the drawbacks so far has been that you always needed to run Laravel Artisan commands from within homestead, as they depending on MCrypt being installed. [...] The accepted solution thus far has been to install newer versions of PHP alongside Apple’s version using Homebrew or MacPorts. [...] However, there’s another method I came across while research some non-related issues: install the latest version of PHP from a binary that includes the MCrypt extension.

He walks you through the complete process (well, except for getting Homestead - that needs to already be there) complete with each command you'll need. You'll need to be familiar with the command line to make this all happen and know how to edit configuration files. If all goes well, the "artisan" command will work correctly and no errors will happen during the compile. He also includes a fix you'll need to put in to get the database configuration working from outside Homestead too.

tagged: laravel homestead command artisan mcrypt install configure database

Link: https://medium.com/@genealabs/run-allthecommands-outside-of-homestead-e2fc8d05251f