search

Home  >  Q&A  >  body text

Laravel has a form page. The content to be saved in the form belongs to two different data tables, corresponding to two controllers. How to submit it?

Please enter the code for a Laravel form page, in which the form data needs to be saved to two different data tables.
Part of the form needs to be submitted to controller A and saved to data table A;
The other part of the form needs to be submitted to controller A and saved to data table A. To submit to controller B, save to data table B.
How to submit?

漂亮男人漂亮男人2786 days ago478

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-05-16 16:56:22

    Submit to one first and inject the other one. A/a is executed first and then new B->b()

    reply
    0
  • Cancelreply