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