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
{{ message }}
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
use Livewire\Component;
use App\Models\Contact;
class ContactForm extends Component
{
public $contact;
public function mount(Contact $contact)
{
$this->contact = $contact;
$this->contact->name = 'Simple name';
}
public function submit()
{
$this->validate();
$this->contact->save();
}
public function rules()
{
return [
'contact.name' => 'required|min:6',
'contact.email' => 'required|email',
];
}
public function render()
{
return view('livewire.contact-form');
}
}
view:
After rendering, the "name" input remains empty
expectation: the "name" input = ''Simple name' and binding wire:model="contact.name"
The text was updated successfully, but these errors were encountered: