PHP code example of codaxis / cakephp-parsley-helper
1. Go to this page and download the library: Download codaxis/cakephp-parsley-helper library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
codaxis / cakephp-parsley-helper example snippets
// In AppController.php
public $helpers = array('ParsleyHelper.ParsleyForm');
// or
public $helpers = array('Form' => array('className' => 'ParsleyHelper.ParsleyForm'));
echo $this->Form->create('MyModel', array('parsley' => true));
// In app/View/Helper
App::uses('ParsleyFormTrait', 'ParsleyHelper.View/Helper');
class MyFormHelper extends VendorFormHelper {
use ParsleyFormTrait;
}
app/Controller/AppController.php