back is not some magic method that whisks you off somewhere else.
Your return goes back to whatever called checkStripe()
If that caller is not expecting a redirect as a response, then it will just ignore it.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
So, in a public function I am calling a method like this $this->checkStripe(), within this function there are some if's and each of them contain some session()->flash() and the return back() or redirect(), but the thing is that when executed the return back() or redirect() doesnt stop the main function execution, it just gets out of the checkStripe();
What's in if():
session()->flash('message', '* Please create a Stripe Account first, before changing the Fee to Paid!');
session()->flash('status', false);
return back();
You have to throw an exception or return a value that the calling code can detect and handle.
Please or to participate in this conversation.