nuh_cevdet's avatar

Help On Using Echo Within The Controller In Laravel Framework

Hello I apologize for my bad english

I currently have a web application running in PHP. I want to migrate this application to Laravel framework but I need help with some matters. Since HTML codes and PHP codes are on a single page in PHP, I was able to print on the screen while PHP codes were working. My HTML codes in Laravel framework are in view, my PHP codes are in controllers. I want to send data to the view at certain places in the code running in the controller.

The structure I want to install will be taken from a form in view with javascript and posted to the controller. Every returned data will be written to the screen without waiting for the last data.

The reason I want to do this is because I have long processes and I don't want the user to keep track of incoming data during this waiting period.

Thank you for your help in advance

for example;

... foreach($array as $item){ ... echo $datas; } ... return $lastData;

0 likes
0 replies

Please or to participate in this conversation.