yelloalejo
How to Execute a Function on Button Click and Component Render in Custom Filament Fields?
Hi, I am creating custom fields and want to include a button that, when clicked, executes a function in my component. The function,
sendOtp
, queries the database and calls services, etc. Additionally, I want to call this function when the component is rendered for the first time.
Here is my base code:
Component:
Blade:
How can I make the button execute the sendOtp
function on click, and also call this function when the component is rendered for the first time?5 replies