PHP code example of jorge / custom-cakephp3

1. Go to this page and download the library: Download jorge/custom-cakephp3 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/ */

    

jorge / custom-cakephp3 example snippets



    Plugin::load("JCustomCakephp3");



    class PostsTable extends Table
    {
        public function initialize($config = [])
        {
            $this->addBehavior("JCustomCakephp3.ConvertDate");
        }
    }



    class PostsTable extends Table
    {
        public function initialize($config = [])
        {
            $this->addBehavior("JCustomCakephp3.ConvertDate", ['fild_name1', 'fild_name2']);
        }
    }



public function validationDefault(Validator $validator)
{
    $validator
        ->provider('custom', new \JCustomCakephp3\Validation\CustomProvider)
        ->add('birth', 'valid', ['rule' => 'dateBR', 'provider' => 'custom'])
        ->