View Source LiveAdmin.Resource (LiveAdmin v0.12.1)

API for managing Ecto schemas and their individual record instances used internally by LiveAdmin.

use LiveAdmin.Resource

This is required in any module that should act as a LiveAdmin Resource. If the module is not an Ecto schema, then the :schema option must be passed. Using this module will create a live_admin_config module variable and a function to query it, live_admin_config/0.

Link to this section Summary

Link to this section Functions

Link to this macro

__using__(opts)

View Source (macro)

Configure a module to act as a LiveAdmin resource

In addition to global options, also accepts schema in case the resource is not also an Ecto schema.

Link to this function

all(keys, resource, prefix, repo)

View Source
Link to this function

change(resource, record \\ nil, params \\ %{}, config)

View Source
Link to this function

create(resource, params, session, repo, config)

View Source
Link to this function

delete(record, resource, session, repo, config)

View Source
Link to this function

fields(resource, config)

View Source
Link to this function

find(key, resource, prefix, repo)

View Source
Link to this function

find!(key, resource, prefix, repo)

View Source
Link to this function

list(resource, opts, session, repo, config)

View Source
Link to this function

render(record, field, resource, assoc_resource, session, config)

View Source
Link to this function

update(record, resource, params, session, config)

View Source
Link to this function

validate(changeset, resource, session, config)

View Source