You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<detailsclass="rounded-lg bg-[#ffede0] dark:bg-[#100f1b] border-2 border-[#ffd6b6] dark:border-[#282732] px-4 py-2"><summary> The <code>label()</code> method accepts a function to dynamically inject utilities. </summary><tableclass="block overflow-x-auto whitespace-nowrap mt-3 mb-0"><thead><trclass="border-b-2 border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-2 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Utility</th><thclass="p-2">Type</th><thclass="p-2">Variable</th><thclass="p-2">Description</th></tr></thead><tbody><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Get</th><tdclass="p-2"><code>Filament\Schemas\Components\Utilities\Get</code></td><tdclass="p-2"><code>$get</code></td><tdclass="p-2">A function for retrieving values from the current form data.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Eloquent model FQN</th><tdclass="p-2"><code>string<Illuminate\Database\Eloquent\Model> | null</code></td><tdclass="p-2"><code>$model</code></td><tdclass="p-2">The Eloquent model FQN for the current schema.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Livewire</th><tdclass="p-2"><code>Livewire\Component</code></td><tdclass="p-2"><code>$livewire</code></td><tdclass="p-2">The Livewire component instance.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Raw state</th><tdclass="p-2"><code>mixed</code></td><tdclass="p-2"><code>$rawState</code></td><tdclass="p-2">The current value of the field, before state casts were applied.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">State</th><tdclass="p-2"><code>mixed</code></td><tdclass="p-2"><code>$state</code></td><tdclass="p-2">The current value of the field.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Operation</th><tdclass="p-2"><code>string</code></td><tdclass="p-2"><code>$operation</code></td><tdclass="p-2">The current operation being performed by the schema. Usually <code>create</code>, <code>edit</code>, or <code>view</code>.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Eloquent record</th><tdclass="p-2"><code>Illuminate\Database\Eloquent\Model | null</code></td><tdclass="p-2"><code>$record</code></td><tdclass="p-2">The Eloquent record for the current schema.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Set</th><tdclass="p-2"><code>Filament\Schemas\Components\Utilities\Set</code></td><tdclass="p-2"><code>$set</code></td><tdclass="p-2">A function for setting values in the current form data.</td></tr></tbody></table></details>
182
+
<detailsclass="rounded-lg bg-[#ffede0] dark:bg-[#100f1b] border-2 border-[#ffd6b6] dark:border-[#282732] px-4 py-2"><summary> The <code>label()</code> method accepts a function to dynamically inject utilities. </summary><tableclass="block overflow-x-auto whitespace-nowrap mt-3 mb-0"><thead><trclass="border-b-2 border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-2 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Utility</th><thclass="p-2">Type</th><thclass="p-2">Parameter</th><thclass="p-2">Description</th></tr></thead><tbody><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Get</th><tdclass="p-2"><code>Filament\Schemas\Components\Utilities\Get</code></td><tdclass="p-2"><code>$get</code></td><tdclass="p-2">A function for retrieving values from the current form data.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Eloquent model FQN</th><tdclass="p-2"><code>?string<Illuminate\Database\Eloquent\Model></code></td><tdclass="p-2"><code>$model</code></td><tdclass="p-2">The Eloquent model FQN for the current schema.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Livewire</th><tdclass="p-2"><code>Livewire\Component</code></td><tdclass="p-2"><code>$livewire</code></td><tdclass="p-2">The Livewire component instance.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Raw state</th><tdclass="p-2"><code>mixed</code></td><tdclass="p-2"><code>$rawState</code></td><tdclass="p-2">The current value of the field, before state casts were applied.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">State</th><tdclass="p-2"><code>mixed</code></td><tdclass="p-2"><code>$state</code></td><tdclass="p-2">The current value of the field.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Operation</th><tdclass="p-2"><code>string</code></td><tdclass="p-2"><code>$operation</code></td><tdclass="p-2">The current operation being performed by the schema. Usually <code>create</code>, <code>edit</code>, or <code>view</code>.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Eloquent record</th><tdclass="p-2"><code>?Illuminate\Database\Eloquent\Model</code></td><tdclass="p-2"><code>$record</code></td><tdclass="p-2">The Eloquent record for the current schema.</td></tr><trclass="border-[#ffd6b6] dark:border-[#282732]"><thclass="py-2 ps-2 pe-4 sticky start-0 z-1 bg-[#ffede0] dark:bg-[#100f1b] after:content-['_'] after:bg-[#ffd6b6] dark:after:bg-[#282732] after:w-[2px] after:h-full after:absolute after:end-0 after:-my-2">Set</th><tdclass="p-2"><code>Filament\Schemas\Components\Utilities\Set</code></td><tdclass="p-2"><code>$set</code></td><tdclass="p-2">A function for setting values in the current form data.</td></tr></tbody></table></details>
183
183
<p>Customizing the label in this way is useful if you wish to use a <ahref="https://laravel.com/docs/localization#retrieving-translation-strings">translation string for localization</a>:</p>
0 commit comments