Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

274
Views
Trouble uploading image with InertiaJS, React and Laravel Use FormHelper

iam just ask how to change method put to post in FormHelper Inertia js, with reactjs sir ?, because iam using formHelper its not working ? are u have suggest. This my code,

const submitHandlerType = (event) => {
    event.preventDefault()
    Inertia.post(route("products.update", model.id), {
        _method: 'put',
        name: data.name,
        category_id: data.category_id,
        descriptions: data.descriptions,
        bestproduct: data.bestproduct,
        image: data.image,

    },{
        onSuccess: () => {reset(), close()},
       }
    )
};

its work, but how to doit with formHelper ?

=========================>

const { data, setData, post, reset, errors, processing, progress } = useForm({
        name: model.name,
        category_id: model.category_id,
        descriptions: model.descriptions,
        bestproduct: model.bestproduct,
        image: null,
    });


  const submitHandlerType = (event) => {
        event.preventDefault();
        post(route("products.update", model.id), {
            data,
            onSuccess: () => {
                reset(), close();
            },
        });
    };

i got null if i die dump in controller with formHelper inertia, please help me thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!