tp5 framework inquiry
cykeyan
cykeyan 2019-10-14 11:31:00
0
2
1368

public function doEdit(Request $request)
{
 
  $data = $request ->except('shebei');
 $condition = ['id'=>$ data['id']];
$result = GongyikaModel::update($data,$condition);
$status = 0;
$message = 'Update failed, please check';
if (true == $result) {
%

Call Stack

  1. atGongyika.php line 104
  2. atError##:: appError (8, 'Undefined index: id', ' E:\myphp_www\PHPTuto... ',104,['request'=> ##objectRequest##),'data'=> []])Gongyika.php line 104%2
cykeyan
cykeyan

reply all(1)
卢小强

Print $data and see if there is an ID in it? If not, there is something wrong with the front-end writing.

  • reply OK
    cykeyan author 2019-10-14 15:41:34
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template