需要从协作者表中删除项目协作者。这是collaboratorController删除方法
public function deleteOneCollaborator($projectId, $collaboratorId) //this is line 112
{
Collaboration::where('project_id', $projectId)
->where('collaborator_id', $collaboratorId)
->delete();
return redirect()->back()->with('info', 'Collaborator deleted successfully');
}
和路线
Route::get('projects/{projects}/collaborators/delete', [
'uses' => 'ProjectCollaboratorsController@deleteOneCollaborator',
]);
删除刀片文件链接
<a href="/projects/{{ $project->id }}/collaborators/delete" class="editInline" onclick="return confirm('Are you sure to want to delete this Collaborator?')"><i clas
s="glyphicon glyphicon-trash"></i>Delete</a>
但是得到了这个错误代码?
ErrorException in ProjectCollaboratorsController.php line 112: Missing argument 2 for App\Http\Controllers\ProjectCollaboratorsController::deleteOneCollaborator()
如何解决这个问题?