Php 拉威尔规划

Php 拉威尔规划,php,laravel-5,Php,Laravel 5,Symfony\Component\Debug\Exception\FatalThroTableError(E\u可恢复错误) 函数App\Http\Controllers\StudentController::update()的参数太少,传递了1个,预期正好是2个 在你的表格中,用 {!! Form::model($StudentEditData, ['method' => 'PATCH','route' => ['student.update', $StudentEditData

Symfony\Component\Debug\Exception\FatalThroTableError(E\u可恢复错误) 函数App\Http\Controllers\StudentController::update()的参数太少,传递了1个,预期正好是2个


在你的表格中,用

{!! Form::model($StudentEditData, ['method' => 'PATCH','route' => ['student.update', $StudentEditData->id],'id'=>'myForm']) !!}


我已经得到了问题的解决能力,问题是我没有在路由函数中保留ID,比如****route::post('/update/{ID}','StudentController@update')->name('update');***

您的问题是?从您对图像的编辑中,检查您的路由-正如它所说的,您缺少一个参数。
公共函数更新(Request$Request$id)
如果您没有传递id,请检查您的路由,您的方法需要两个参数
{!! Form::model($StudentEditData, ['method' => 'PATCH','route' => ['student.update', $StudentEditData->id],'id'=>'myForm']) !!}