Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

8.1. Using Guard in PHP

Shin Okada edited this page Sep 12, 2015 · 1 revision

Adding Guard to PHP project

Install Chrome LiveReload.

Create a Gemfile.

source 'https://rubygems.org'
group :development do
  gem 'guard'
  gem 'guard-livereload', require: false
end

Run bundle install.

Run guard init to create a Guardfile. And add this in the Guardfile.

Monitor any files with the suffix of css, js, html or php.

guard 'livereload' do
  watch(%r{.+\.(css|js|html|php)$})
end

Run the server, run guard and click chrome LiveReload plugin to monitor.

php -S localhost:8888
# in other tab
guard

8. Guard.md


  1. Using Guard in PHP

Clone this wiki locally