skip to Main Content

Should CakePHP 4 always eager load associations?

In my CakePHP 4 project, I have two models with a one-to-many relationship between them: <?php namespace AppModelTable; use CakeORMTable; class ContentsTable extends Table { public function initialize(array $config): void { parent::initialize($config); $this->setTable('contents'); $this->setPrimaryKey('id'); // more relations here $this->belongsTo('ContentTypes', […

VIEW QUESTION

UnlockField not working in CakePHP for array

I have a form that has to handle some elements as part of an array. echo $this->Form->control('config.sys_file_id', ['type' => 'number']); echo $this->Form->control('click_enlarge', ['type' => 'checkbox']); echo $this->Form->control('config.max_width', ['type' => 'number']); echo $this->Form->control('config.max_height', ['type' => 'number']); echo $this->Form->control('config.fixed_width', ['type' => 'number']);…

VIEW QUESTION
Back To Top
Search