Model nodes
CRUD against your Eloquent models. model is always a fully-qualified class name
(App\Models\Order::class). Each node validates that the class is an Eloquent
model and fails otherwise.
In the interactive builder, the attributes / with groups are filled in
dynamically from the chosen model — its fillable attributes and its
relationship methods. In code you supply them directly.
Create record
@wf::model.create · ModelCreateNode
| Field | Type | Notes |
|---|---|---|
model | text | Required. |
attributes | group | Attribute → value map passed to Model::create(). Supports {{ }}. |
Output: the created record's full attribute array — so {{ nodes.<id>.id }},
{{ nodes.<id>.created_at }}, etc.
['id' => 'ticket', 'type' => ModelCreateNode::type(), 'config' => [
'model' => \App\Models\Ticket::class,
'attributes' => ['subject' => '{{ trigger.subject }}', 'status' => 'open'],
]]
Update record
@wf::model.update · ModelUpdateNode
Finds one record by key = value and updates it.
| Field | Type | Default | Notes |
|---|---|---|---|
model | text | — | Required. |
key | text | id | Column to match on. |
value | text | — | Required. Supports {{ }}. |
attributes | group | — | Attribute → value map. Supports {{ }}. |
Fails if no record matches. Output: the fresh record's attribute array.
Delete record
@wf::model.delete · ModelDeleteNode
Finds one record by key = value and deletes it.
| Field | Type | Default | Notes |
|---|---|---|---|
model | text | — | Required. |
key | text | id | |
value | text | — | Required. |
Fails if no record matches. Output: { "model": "App\\Models\\Order", "<key>": "<value>" }
List records
@wf::model.list · ModelListNode
Queries the model, optionally filtered, ordered, eager-loaded, and limited.
| Field | Type | Default | Notes |
|---|---|---|---|
model | text | — | Required. |
filter | checkbox | false | Turn on a single column condition. |
field | text | — | (when filter) Column to filter by. |
operator | select | = | (when filter) =, !=, >, >=, <, <=, like, not_like, starts_with, ends_with, in, not_in, is_null, is_not_null. |
value | text | — | (for scalar operators) Supports {{ }}. |
values | json | — | (for in / not_in) JSON array. Supports {{ }}. |
with | group | — | Relationships to eager-load. |
order_by | text | — | Column to sort by. Blank = unordered. |
order_direction | select | asc | asc or desc. |
limit | number | 100 | 0 = no limit. |
Output: { "result": [ ...rows as arrays ], "count": <n> } — feed result
straight into a Loop or a collection node.