This package is abandoned and no longer maintained. No replacement package was suggested.

This is a package which can be called to watch a list of paths.

v0.1 2014-01-04 16:02 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:29:21 UTC


No ruby? No node? No problem.

Guard allows you to run custom and packaged events whenever files are changed with your configurable paths. Note, this package is meant to be used with Laravel 4.

To get started update your dependencies in composer.json

	"require": {
		"codesleeve/guard": "dev-master"

The service provider needs to be registered in app/config/app.php

'providers' => array(

And voila! You should now be able to run

   php artisan guard:watch

This doesn't do much except print out changes to our assets though. So let's learn how to configure this thing.


First you should publish the config

   php artisan config:publish codesleeve/guard

Next open up app/config/packages/codessleve/guard/config.php


These paths are relative to your base laravel project and will be monitored by Guard. There can be both directories and files in this array.

	'paths' => array(


Event classes should implement Codesleeve\Guard\Events\EventInterface and are called in order whenever a file in your paths above changes.

	'events' => array(
		new Codesleeve\Guard\Events\LogEvent


pcntl_signal disabled_functions

In order to capture the ctrl+c event from keyboard we use pcntl_signal which depending on what package manager/operating system you use could be disabled in your php.ini. Be sure to remove pcntl_signal from your disabled_functions.