search

Home  >  Q&A  >  body text

tp5 framework inquiry

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
cykeyancykeyan1870 days ago1359

reply all(2)I'll reply

  • 卢小强

    卢小强2019-10-14 15:39:22

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

    reply
    0
  • cykeyan

    OK

    cykeyan · 2019-10-14 15:41:34
  • Cancelreply