soenkelange / live_cake
LiveCake is a plugin for CakePHP using LiveReload
1.0.1
2014-01-30 15:34 UTC
Requires
- php: >=5.3.3
- composer/installers: *
This package is not auto-updated.
Last update: 2026-02-24 12:43:25 UTC
README
LiveCake is a plugin for CakePHP using LiveReload
##Requirements
- CakePHP >= 2.3
- LiveReload
Installation
Composer
Be sure require is present in composer.json. This will install the plugin into app/Plugin/LiveCake
{
"require": {
"soenkelange/live_cake": "*"
}
}
Enable
You need to enable the plugin in your app/COnfig/bootstrap.php file:
CakePlugin::load('LiveCake');
How to use
To use this helper add the following to you AppController:
<?php ... public $helpers = array(..., 'LiveCake.LiveReload');
This will insert <script type="text/javascript" src="http://localhost:35729/livereload.js"></script> before in the respons body.
To customize the path, you can use the helper settings:
<?php ... public $helpers = array(..., 'LiveCake.LiveReload' => array('jsPath' => 'YOUR_CUSTOM_PATH'));