/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $project = Project::findFail($id); $project->delete(); $this->data->name = $project->name; return $this->json(); }