Answer the question
In order to leave comments, you need to log in
How to load data after AJAX inserting data into Yii2 database?
I add a post through ActiveForm, the data is loaded asynchronously using AJAX. How to make a query to the database after loading the data so that this record immediately appears on the page.
Answer the question
In order to leave comments, you need to log in
by clicking on the button, launch ajax and immediately pass the id, and catch the action in it make a request by this id if there is 1 record, for exampleUser::findOne($id);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question