我正在使用CakePHP2.8,我想在模型之间共享多个自定义验证方法。 我创建了一个帮助程序CustomValidators.php类,使用已知在模型中工作的自定义验证方法。 这里的逻辑不是问题,这里只是为了说明。 <?php
App::uses('CakeLog', 'Utility');
class CustomValidators {
public function che
我已经使用authcomponent在Cakephp中完成了简单的登录,它确实工作正常,我该如何使用ajax进行登录? 我有下面给出的是简单的登录使用代码: if ($this->request->is('post'))
{
if ($this->Auth->login())
{
if ($this->Auth->user('role') === 'admin')