Laravel Homestead and Blackfire.io
/etc/hostsfile. Laravel’s implementation of this includes PHP 5.6, Node JS, HHVM, Nginx and lots of other goodies all setup and ready to go. Additionally it already has everything you need installed to communicate with Blackfire.io. All you need to do is create a Blackfire account and copy your client credentials into the Homestead configuration file.
Setting it up
- Install Homestead and provision a site
- Get a Blackfire.io account
- Get the browser plugin (this link is for the Chrome one).
- Copy your Blackfire account credentials into your Homstead.yaml file. (probably located at
- Start your Homstead VM
- You may need to SSH into your Homestead VM and install blackfire-php (shown below)
- Once VM is started and your site is provisioned, navigate to the site, and use the browser plugin (companion) to start profiling.
- Make your app faster!
➜ .homestead ssh homestead Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-24-generic x86_64) * Documentation: https://help.ubuntu.com/ Last login: Thu Jul 16 13:36:58 2015 from 10.0.2.2 vagrant@homestead:~$ sudo /etc/init.d/blackfire-agent restart * Restarting Blackfire Agent blackfire-agent [ OK ] ➜ vagrant@homestead:~$ sudo apt-get install blackfire-php Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: blackfire-php 1 upgraded, 0 newly installed, 0 to remove and 33 not upgraded. Need to get 746 kB of archives. After this operation, 4,096 B of additional disk space will be used. Get:1 http://packages.blackfire.io/debian/ any/main blackfire-php amd64 0.25.1 [746 kB] Fetched 746 kB in 4s (171 kB/s) (Reading database ... 67585 files and directories currently installed.) Preparing to unpack .../blackfire-php_0.25.1_amd64.deb ... Unpacking blackfire-php (0.25.1) over (0.24.1) ... Setting up blackfire-php (0.25.1) ... blackfire-php install completed.
I hope this quick recommendation and guide has been helpful. I would love to hear about your experiences with these tools, comment blow.