need delete project collaborator from collaborator table. this is collaboratorController delete method
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');
}
and routes
Route::get('projects/{projects}/collaborators/delete', [
'uses' => 'ProjectCollaboratorsController@deleteOneCollaborator',
]);
delete blade file link
<a href="/projects//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>
but got this error code?
ErrorException in ProjectCollaboratorsController.php line 112: Missing argument 2 for App\Http\Controllers\ProjectCollaboratorsController::deleteOneCollaborator()
how to fix this problem?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kMHVXx
via IFTTT
Aucun commentaire:
Enregistrer un commentaire