PHP code example of cakephp-tutorial / autodate
1. Go to this page and download the library: Download cakephp-tutorial/autodate 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/ */
cakephp-tutorial / autodate example snippets
/**
* Attach to AppModel to auto convert all date fields
* or attach it to a single model
**/
class AppModel extends Model {
public $actsAs = array(
'Autodate.Autodate' => array('dateformat' => 'd/m/Y')
);
}
CakePlugin::load('Autodate');