The short answer is NO, it will not persist, it will not even persist in the different steps. The controller object is destroyed as soon as the request has done it's part.
Will the Controller Persist? Ensuring Seamless Workflow Execution with Laravel
I've developed a workflow UI enabling users to trigger a sequence of steps. The backend is being developed on Laravel. It's designed to establish SSH connections to remote servers and execute commands.
My Problem: Upon clicking the play or run button, a controller in Laravel initializes the execution of these steps. At each step's conclusion, the controller determines the subsequent step and proceeds with the process.
Now, let's consider a scenario where a user closes their web browser during, say, the second step. Will the Laravel controller persist in executing subsequent steps, eventually reaching step 7—the workflow's end? Or will the closure of the web browser halt the execution flow, preventing the controller from progressing?
Moreover, I'm interested in ensuring continuous execution by the controller, irrespective of whether the user closes their web browser. What strategies or techniques can be employed within Laravel to achieve this seamless execution?
Your insights are greatly appreciated! Thank you.
@emmatraversy you could place all the steps as jobs on the queue, and probably in a batch
A big consideration is how you intend to report progress?
Please or to participate in this conversation.