Klassen Laraknife: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „= Links = * Laraknife = Comboboxen erstellen = <pre> // Combobox für SProperty-Verweis $optionsStatus = SProperty::optionsByScope('notestatus', $fields['status'], 'all'); // Combobox für Verweis in andere Tabelle: $optionsUser = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['user']); $context = new ContextLaraKnife($request, $fields); return view('note.index', [ 'records' => $records, 'context' => $context, '…“) |
|||
Zeile 18: | Zeile 18: | ||
'pagination' => $pagination | 'pagination' => $pagination | ||
]); | ]); | ||
</pre> | |||
In der View: | |||
<pre> | |||
<x-laraknife.combobox position="alone" name="status" label="Status" :options="$optionsStatus" class="lkn-autoupdate" width2="4" /> | |||
<x-laraknife.combobox position="alone" name="user" label="User" :options="$optionsUser" class="lkn-autoupdate" width2="4" /> | |||
</pre> | </pre> |
Aktuelle Version vom 3. Februar 2024, 18:00 Uhr
Links
Comboboxen erstellen
// Combobox für SProperty-Verweis $optionsStatus = SProperty::optionsByScope('notestatus', $fields['status'], 'all'); // Combobox für Verweis in andere Tabelle: $optionsUser = DbHelper::comboboxDataOfTable('users', 'name', 'id', $fields['user']); $context = new ContextLaraKnife($request, $fields); return view('note.index', [ 'records' => $records, 'context' => $context, 'optionsCategory' => $optionsCategory, 'optionsStatus' => $optionsStatus, 'optionsUser' => $optionsUser, 'pagination' => $pagination ]);
In der View:
<x-laraknife.combobox position="alone" name="status" label="Status" :options="$optionsStatus" class="lkn-autoupdate" width2="4" /> <x-laraknife.combobox position="alone" name="user" label="User" :options="$optionsUser" class="lkn-autoupdate" width2="4" />