in simple controller i want to put and get simple variables to session. in this my code after return to view and callback to other function my session is empty and return null
public function doAction()
{
$this->order_id = Session::get('order_id');
$this->reference_id = Session::get('reference_id');
dd(Session::get('order_id') . ' ' . Session::get('reference_id'));
}
public function action(Request $request)
{
Session::put('order_id', $request->input('order_id'));
Session::put('reference_id', $request->input('reference_id'));
}
My Route:
$app->get('paymentRequest' , 'PaymentTransactionController@action');
$app->get('doAction' , 'PaymentTransactionController@doAction');
My View:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
{{$request['order_id']}}
<a href="{{url('doAction')}}">CLICK</a>
</body>
</html>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire