All seems ok. Do you have further information about the error ?
May 30, 2023
4
Level 9
Method Livewire\Redirector::withInput does not exist.
I have installed Livewire on a fresh Laravel 10 install in PHP 8.2 as per the docs, and created this component:
<?php
namespace App\Http\Livewire;
use Livewire\Component;
class FilterAssignments extends Component
{
public $someDate;
protected $rules = [
'someDate' => 'nullable|date_format:d.m.Y',
];
public function render()
{
$this->validate();
return view('livewire.filter-assignments');
}
}
and this view:
<div>
<input wire:model="someDate" type="date">
</div>
and included in on default welcome.php like this:
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
@livewireStyles
</head>
<body>
<livewire:filter-assignments />
@livewireScripts
</body>
</html>
whenever I change the date I expect nothing to happen, as the validation should fail silently, but instead I get this error:
Method Livewire\Redirector::withInput does not exist.
What am I missing?
Please or to participate in this conversation.