'when i use validate method in my controller i keep get this error The GET method is not supported for this route. Supported methods: POST
this is my form
@extends ("layouts.register")
@section ("content")
test
@csrf @error('confirmCode') {{$message}} @enderror@endsection
when i use validate method in my controller i keep get this error
The GET method is not supported for this route. Supported methods: POST.
controller :
public function confirmcode(Request $request)
{
$this->validate($request,["confirmCode"=>"required"]);
}
route:
Route::get("/register",[UserAuthController::class,'index'])->name("register"); Route::post("/user/register",[UserAuthController::class,'register'])->name("user.register"); Route::post("/user/confirmCode",[UserAuthController::class,'confirmcode'])->name("user.confirmCode");
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
