How to push `script` & `css` in custom form field filament?

Im make custom field filament v4
https://filamentphp.com/docs/4.x/forms/custom-fields

@once('scripts')
@endonce

@once('styles')
@endonce

<x-dynamic-component
    :component="$getFieldWrapperView()"
    :field="$field"
>    
    <div x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }">
        <input x-model="state" />
    </div>
</x-dynamic-component>


I want only load once css & js when form using this custom field.
Was this page helpful?