soenkelange/live_cake

LiveCake is a plugin for CakePHP using LiveReload

Installs: 52

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 0

Forks: 0

Open Issues: 0

Type:cakephp-plugin

1.0.1 2014-01-30 15:34 UTC

This package is not auto-updated.

Last update: 2024-04-23 04:17:21 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'));