Answer the question
In order to leave comments, you need to log in
How to send results from one form to two tables, while the id of the first one should be written to the pid of the other?
How to send results from one form to two tables, while the id of the first one should be recorded in the entity_id of the other? .
Answer the question
In order to leave comments, you need to log in
Judging by the tag, this is Lara.
Ajax sends data to the backend to some kind of controller. Suppose public function manageForm(Request $request)
Accordingly, you have three models - Entity, EntityTranslate and Language
In the controller, something like
$entity = Entity::create(['A' => $request->get(' A')]);
$entityTranslate = EntityTranslate:: create(['EntityId' => $entity->id]);
The basics
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question