1- Create your action, your Laravel Action You can see that I alredy have a notification that handles the email where the new password is sent.
<?php
namespace App\Actions;
package middleware | |
import "net/http" | |
const ( | |
xFrameOptions = "X-Frame-Options" | |
xFrameOptionsValue = "DENY" | |
xContentTypeOptions = "X-Content-Type-Options" | |
xContentTypeOptionsValue = "nosniff" | |
xssProtection = "X-XSS-Protection" |
When you open an edit form in Filament, the default
property doesn't work, it only works when creating a new record.
In this case you want to use the afterStateHydrated
property, inject the current form Component
and, in my case, also inject the Get
so that I can get the value of another property:
Forms\Components\TextInput::make('value')
->label(
function(Get $get) {
Using Filament 3 and Laravel 10, if you want to get the label from a select you can use getOptions()
to get an array of the options and use the $state
(or Get works too) to get the value that you selected.
Forms\Components\Select::make('exchange_rate_id')
->relationship('exchange_rate', 'rate')
->searchable()
->preload()
->live() // don't miss this, it's important for this to work