Expose custom entity to views

I’ve created an entity in a Drupal 8 custom module. Right now it’s just an entity with base fields.

I want to expose these base fields to views.

I have the entity appearing on the views wizard page, but when I create the view, there are no base fields available for me to add, and the default field that views puts in there shows up as broken/missing.

I’ve tried referencing the comments module for examples, and have tried defining various views plugins, but I’m not having much luck.

I have baseFieldDefinitions($entity_type) defined in my entity controller. What else is required to expose this entity and its fields to views?

Go to Source of this post
Author Of this post: Coder1
Title Of post: Expose custom entity to views
Author Link: {authorlink}