/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $task = Task::find($id); $task->delete(); ProjectController::updateTotals($task->project_id); return redirect()->action('TaskController@index'); }