5 months ago

Session Variable disappeared in controller

Posted 5 months ago by ssquare

I am trying to store booking details using a session variable. In the first function:

public function hold(Request $request){
         $details = [
                'times' => $arr,
                'subTotal' => $subTotal,
                'tax' => $tax

Next, it will be posted to another function of same controller. Upto this point session is available.

public function checkout(){

Next route is on payment controller. This is another controller than the previous one. Here, the session variable is empty.

public function createPayment(){

What am I doing wrong? How can I access session in this createPayment function?

Please sign in or create an account to participate in this conversation.