1.Apache ,MySQl Start
2.View Template
①index.ctp
②add.ctp
3.Controller
PeopleController.php
4.Model
PeopleTable.php
1.Apache ,MySQl Start
2.View Template
C:\xampp\htdocs\mycakeapp\src\Template\People
①index.ctp
<p>This is People table records.</p>
<?=$this->Form->create(null,
['type'=>'post',
'url'=>['controller'=>'People',
'action'=>'index']]) ?>
<div>find</div>
<div><?=$this->Form->text('People.find') ?></div>
<div><?=$this->Form->submit('検索') ?></div>
<?=$this->Form->end() ?>
<hr>
<table>
<thead><tr>
<th>id</th><th>name</th><th>mail</th><th>age</th><th></th>
</tr></thead>
<?php foreach($data->toArray() as $obj): ?>
<tr>
<td><?=h($obj->id) ?></td>
<td><a href="<?=$this->Url->build(['controller'=>'People',
'action'=>'edit']); ?>?id=<?=$obj->id ?>">
<?=h($obj->name) ?></a></td>