超絶今更すぎるリマインド。
■セキュリティーコンポーネントを有効にする。
public $components = ['Security'];
※コントローラーのメンバ変数です。
■改竄対策、CSRF対策を個別に操作する。
// 改竄対策をオフにする $this->Security->validatePost = false; // CSRF対応をオフにする $this->Security->csrfCheck = false;
超絶今更すぎるリマインド。
■セキュリティーコンポーネントを有効にする。
public $components = ['Security'];
※コントローラーのメンバ変数です。
■改竄対策、CSRF対策を個別に操作する。
// 改竄対策をオフにする $this->Security->validatePost = false; // CSRF対応をオフにする $this->Security->csrfCheck = false;
忘れるので、自分用めも。
// Bad Request エラー
throw new BadRequestException('message');
// Forbidden エラー
throw new ForbiddenException('message');
// Not Found エラー
throw new NotFoundException('message');
// Method Not Allowed エラー
throw new MethodNotAllowedException('message');
// Internal Server Error エラー
throw new InternalErrorException('message');
// Not Implemented Errors エラー
throw new NotImplementedException('message');