Over the holiday, Mom had been gifted a new Macbook Air and was kind enough to send me home with her old 13″ Macbook Pro. After making the appropriate backups, I decided to reformat the Macbook and to turn it into my development machine. During some downtime over New Years, I started with a fresh copy of Yosemite and installed Homebrew, Git, Node.js/NPM, Vagrant, VirtualBox, SequelPro, Composer, and a handful of other often-used applications.
I’ve had my eye on the Laravel PHP framework for awhile now, but with so much to learn in the web development field, I had to prioritize my time and efforts. When I stumbled upon the Louisville Laravel Meetup group run by VOLTAGE Advertising + Design, I decided it was time to bring Laravel to the front of the line. In preparation for the Meetup’s next event, I went to work setting up their demo project.
First, I installed the Laravel Homestead pre-packaged virtual machine, which is fairly easy to set up with the help of Jeffrey Way’s “laracast” on the subject. From there, I had to edit the Homestead.yaml
configuration file. Though simple, it took me a few (pre-coffee) tries to get this right. I cloned the demo app on my new development laptop, fired up Homestead, and ran composer install
to pull in the necessary Laravel dependencies. Fail! The mcrypt
PHP extension was not installed. I spent the majority of my afternoon attempting to get this situated, but none of the tutorials I tried were helpful for Yosemite. I finally came across Michael Gracie’s post, successfully installed the dependency, and did a happy dance in the living room.
Once composer did it’s thing, I ssh’d into the virtual machine and found the mapped directory where the code was sync’d to. After a few attempts at getting connected to the VM’s database (and realizing that I probably didn’t need MySQL installed locally), I ran php artisan migrate:install
followed by php artisan migrate
to create the necessary tables. From there, I added in some sample data and visited the URL to see the demo app in action.
Though simple at this time, the app served as a marker for a successful first installation of Laravel. I look forward to getting my hands dirty on a few small apps of my own and to attending the next Louisville Laravel Meetup event!