I have a function on controller like crawl.
My Controller sometimes sleeping 10 seconds, sometimes go away.
Like this:
while ($someTrueFalse) {
$data[]=$gettingdata;
$wantToPassText="Received ".count($data)." - Sleeping 10 seconds";
if($someControl){
$someTrueFalse=false;
}
sleep(10);
}
return view('any_view');
How can I access the $wantToPassText variable from any views?
I tried,
setcookie('data',$wantToPassText,time()+60);
But i can't accessing while controller processing. I can access only when process finishes.
I tried, write database this $wantToPassText, but i can't access again while processing.
I mean, i want write on page live process status. How is it possible?
Sorry my bad english...
$wantToPassTextif it's passed from the controller to the view.