my srcipt cannot effect
public function edit($id = null)
{
$hubungan = [‘profile’];
$user = $this->Users->get($id, [
‘contain’ => $hubungan
]);
if ($this->request->is([‘patch’, ‘post’, ‘put’])) {
$user = $this->Users->patchEntity($user,$this->request->getData(),[‘associated’=>$hubungan]);
if ($this->Users->save($user)) {
$this->Flash->success(__(‘The user has been saved.’));
return $this->redirect(['action' => 'edit',$id]);
}
$this->Flash->error(__('The user could not be saved. Please, try again.'));
}
$this->set(compact('user'));
}
<?= $this->Form->create($user) ?>
<div class="columns large-6 ">
<?php
echo $this->Form->control('username');
echo $this->Form->control('password');
echo $this->Form->control('role');
echo $this->Form->control('status',['options'=>['1'=>'Aktif','0'=>'Tidak Aktif']]);
?>
</div >
<div class="columns large-6">
<?php
echo $this->Form->control('Profile.nama_user');
echo $this->Form->control('Profile.jenis_kelamin');
echo $this->Form->control('Profile.alamat',['type'=>'textarea']);
?>
</div>
<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?>
help me