public function update(Request $request, $id)
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $request->validate(["content" => "required|max:1024"]);
        $note = Note::findOrFail($id);
        $note->content = $request->get("content");
        $this->authorize('manage', $note);
        $note->save();
        return fractal($note, new NoteTransformer())
            ->withResourceName('note')
            ->respond();

    }