soenkelange/live_cake

LiveCake is a plugin for CakePHP using LiveReload

Installs: 36

Dependents: 0

Stars: 1

Watchers: 1

Language: PHP

1.0.1 2014-01-30 15:34 UTC

README

LiveCake is a plugin for CakePHP using LiveReload

Requirements

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'));