Render dynamic

Hi there,

i want to render a process.

I’m filling my model in the controller.

In this controller I’m doing some stuff which takes some minutes. (CURL Download)

In my View I want to show the process steps, so I need to render the view out of the controller.

To render the view I has to call


 return $this->render('sync', [

            'model' => $this->findModel($id),

        ]);

Is there any possibility to render/update the view without return. I need something like this

controller:




render layout

foreach ($lines as $line){

filling model

download $line with curl

render something like "download $line succeeded"

save model

}






Hi,

Please try to use ajax based update for each item you want to process. It is easier to show the user about the progress completed.

OR

Create new action in your controller and call frequently from client script which will give you the current status of the progress from the table.

OR

Share some code snippet, I will try to help you

Cheers!, Happy Coding.