cakephp useful codes

to Reset password controller function

  $hasher = new \Cake\Auth\DefaultPasswordHasher();
 debug($hasher->hash('00112233'));
exit();

How to on Debug mode cakephp3

down vote
According to the cookbook, you can enable or disable the debug mode by changing the value of the "debug" parameter in the config/app.php file.
/**
 * Debug Level:
 *
 * Production Mode:
 * false: No error messages, errors, or warnings shown.
 *
 * Development Mode:
 * true: Errors and warnings shown.
 */
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
And in your controller, you can do logging using the log() method (available for all objects) :
$this->log('debug message','debug');
$this->log($data, 'debug');

Comments

Popular posts from this blog

OPEN Cart Find Parent Categories and there Child Categories list in Ms Excel export

Git Commands