In My controller :
$this->validate($request, [
'name' => 'required',
]);
$tasks = new Task;
$tasks->name = $request->todo;
if($tasks->save()){
$tasks->save();
return back();
}
The field is filled and the issue is that the validator still throws error:
The name field is required.
Am i missing something.