class UsernameEntry extends Livewire\Component implements HasForms
{
use InteractsWithForms;
...
public function form(Form $form): form
{
return $form->schema([
TextInput::make('username')
->live(),
])->statePath('data');
$this->dispatch('showSaveMessage');
}
public function updatedData($value): void
{
$this->application->username = $value;
$this->application->save();
}
}
class UsernameEntry extends Livewire\Component implements HasForms
{
use InteractsWithForms;
...
public function form(Form $form): form
{
return $form->schema([
TextInput::make('username')
->live(),
])->statePath('data');
$this->dispatch('showSaveMessage');
}
public function updatedData($value): void
{
$this->application->username = $value;
$this->application->save();
}
}