Doc layout is array of field that help you to manage the layout of the fields in the document.
with doc layout you can add custom fields, fields with condition :
Render fields in the same Row
module.exports = function (app) {
const Model = createModel(app);
const paginate = app.get('paginate'); // Register validators to validate schema and to register dashboard screen;
const options = {
Model,
paginate,
serviceRules,
dashboardConfig: {
docLayout:
[
'_id',
['firstName', 'lastName']
]
}
};
// Initialize our service with any options it requires
app.use('/invitations', new Invitations(options));
// Get our initialized service so that we can register hooks
const service = app.service('invitations');
service.hooks(hooks);
};