The GET method is not supported for route update_user. Supported methods: POST. when trying to validate()

im facing a problem when i try to validate fields that are coming from a form, i “copied” the create template and function that is working but when i call my fuction store_updated_user, shows the error, if I comment the validation, the record is succesfully updated.

@include('layout.header')
<body>
  <div class="container">
      <div class="row">
          <div class="col-md-col-md-offset-4">
              <p class="h1">Actualizar Usuario</p>
              <hr class="rounded">
              <form action="{{route('store_updated_user')}}" method="post" enctype="multipart/form-data">
                  @csrf
              
                  @if (Session::has('success'))
                      <div class="alert alert-success">
                          {{Session::get('success')}}
                      </div>
                  @endif
                  @if (Session::has('fail'))
                  <div class="alert alert-danger">
                      {{Session::get('fail')}}
                  </div>
              @endif
            <div class="row">
                <div class="col-md-4">
                <div class="form-group">
                    <label for="id">ID Usuario</label>
                    <input type="text" name="idtoupdate" value="{{$usertoupdate->id }}" hidden>
                    <input type="text" name="id" value="{{$usertoupdate->id }}" disabled>
                </div>
            </div>
            </div>
              </div>
              <div class="row">
                <div class="col-md-4">
                  <div class="form-group">
                      <label for="name">Nombre</label>
                      <input type="text" name="name" class="form-control" value="{{ $usertoupdate->name , old('name') }}">
                      <span class="text-danger">
                          @error('name')
                              {{$message}}
                          @enderror
                      </span>
                  </div>
                </div>
                <div class="col-md-4">
                  <div class="form-group">
                      <label for="last_name">Apellido Paterno</label>
                      <input type="text" name="last_name" class="form-control" value="{{$usertoupdate->last_name , old('last_name')}}">
                      <span class="text-danger">
                          @error('last_name')
                              {{$message}}
                          @enderror
                      </span>
                  </div>
                </div>
                <div class="col-md-4">
                  <div class="form-group">
                      <label for="m_last_name">Apellido Materno</label>
                      <input type="text" name="m_last_name" class="form-control" value="{{$usertoupdate->m_last_name , old('m_last_name')}}">
                      <span class="text-danger">
                          @error('m_last_name')
                              {{$message}}
                          @enderror
                      </span>
                  </div>
                </div>
              </div> 
              <div class="row">
                <div class="col-md-4">   
                  <div class="form-group">
                      <label for="email">Email</label>
                      <input type="email" name="email" class="form-control" value="{{$usertoupdate->email , old('email')}}">
                      <span class="text-danger">
                          @error('email')
                              {{$message}}
                          @enderror
                      </span>
                  </div>
                </div>
               


                <div class="col-md-4">  
                  <div class="form-group">
                      <label for="birth_date">Fecha de Nacimiento</label>
                      <input type="date" name="birth_date" class="form-control" value="{{$usertoupdate->birth_date , old('birth_date')}}">
                      <span class="text-danger">
                          @error('birth_date')
                              {{$message}}
                          @enderror
                      </span>
                  </div>
                </div>
                <div class="col-md-4">
                  <div class="form-group">
                      <label for="born_place">Lugar de Nacimiento</label>
                      <input type="text" name="born_place" class="form-control" value="{{$usertoupdate->born_place , old('born_place')}}">
                      <span class="text-danger">
                          @error('born_place')
                              {{$message}}
                          @enderror
                      </span>
                  </div>
                </div>
              </div>
              <div class="row">
                <div class="col-md-4">
                  <div class="form-group">
                      <label for="curp">CURP</label>
                      <input type="text" name="curp" class="form-control"  value="{{$usertoupdate->curp , old('curp')}}">
                      <span class="text-danger">
                          @error('curp')
                              {{$message}}
                          @enderror
                      </span>
                  </div>
                </div>
                <div class="col-md-4">
                  <div class="form-group">
                      <label for="role">Tipo de usuario</label>
                      <select id="role" name="role" class="form-control">
                          @if($user_data->role == 1 )<option value="1" @if($usertoupdate->role == 1) selected  @endif>Administrador</option>@endif
                          @if($user_data->role == 1 )<option value="2" @if($usertoupdate->role == 2) selected  @endif>Cordinador</option>@endif
                          <option value="3" @if($usertoupdate->role == 3) selected  @endif>Maestro</option>
                          <option value="4" @if($usertoupdate->role == 4) selected  @endif>Alumno</option>
                        </select>
                      <span class="text-danger">
                      </span>
                  </div>
                </div>
              </div>
              <div class="row justify-content-center">
                <div class="col-md-5">
                </div>
                <div class="col-md-2">
                  <div class="form-group">
                      <button type="submit" class="btn btn-block btn-success">Actualizar Usuario</button>
                  </div>
                </div>
                <div class="col-md-5">
                </div>
              </div>

              </form>
          </div>
      </div>

      <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
  </div>

</body>
</html>
public function store_updated_user(Request $request)
{
    $request->validate([
        'name' => 'required',
        'last_name' => 'required',
        'email' => 'required|unique:users,email',
        'birth_date' => 'required:date',
        'born_place' => 'required',
        'curp' => 'required|string|min:18|max:18',
    ]);

    return('validacion completada');

    /*
    $user_data = array();
    if(Session::has('loginId')){
        $user_data = User::where('id','=',Session::get('loginId'))->first();
    }
    $idtoupdate = $request->idtoupdate;
    $usertoupdate = array();
    $usertoupdate = DB::table('users')->where('id', $idtoupdate)->first();
    */
}
Route::controller(AdminController::class)->group(function() {
    Route::get('/dashboard','dashboard')->middleware('isLoggedIn');
    Route::get('/create_user','create_user')->middleware('isLoggedIn');
    Route::post('/registration-user','registerUser')->name('register-user');
    Route::get('/view_user', 'view_user')->middleware('isLoggedIn');
    Route::post('/update_user', 'update_user')->name('update_user');
    Route::post('/store_updated_user', 'store_updated_user')->name('store_updated_user');
    Route::get('/test','test')->middleware('isLoggedIn');
});

I want to validate the fields that are coming from my update_user form.

New contributor

Gunter Abreu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật