Admin UI
Form Elements
These widgets all act like form inputs in a component's settings form. The full list of control types, with their options, is in Editor Setup.
Collections
The collection control allows users to collect an ordered list of items, such as posts from a products, songs or recipes collection. Specify the collection's source. For example, a collection of songs:
[
'name' => 'collection',
'controltype' => 'collection',
'source' => 'posts:songs',
'value' => [],
'label' => 'Collection',
],
The value saved is an array of IDs. For custom content types, add a lister class to app/Domain/Admin/ObjectLists/, named after the part of source before the colon (products:… → Products). It needs two methods:
public function view($list): \Illuminate\Support\Collection
This method accepts an array of IDs (the collected IDs) and returns the objects to show in the admin list. Each item should have these properties:
- id
- title
- status {optional}
- thumbnail {optional}
The helper also needs a method returning the items that can be selected:
public function options($type = '', $search = '')
$type is the part of source after the colon, and $search is what the editor typed. Each item has the same properties as those returned by view().
Page Selector
page_select / page_selector pick a single page. Unlike the page collection, which collects page IDs, these store the page's URL.
Page Collection
page_collection lets users collect an ordered list of pages. The value is an array of page IDs.
In this section
- Data Tables — Generate Livewire data tables for admin list pages, with filters and batch actions.
- Dashboards — Build widgets for the admin dashboard, where each person chooses and orders the widgets they see.
- Admin Tools — Add single-page admin tools for diagnostics and one-off jobs that don't need a full admin section.
- Extending Admin Pages — Ways to extend the Textstem admin with your own layouts and scripts.