Welcome Guest, Not a member yet? Register   Sign In
$this->cart->contents() is empty. when ever i try to call function from Postman
#1

Hi,

I am trying to show cart items. but  when ever i try to call function from Postman (http://www.xyz.com/Order/OrderSuccess) is shows empty array and if i call same function in browser(http://www.xyz.com/Order/OrderSuccess) it shows array of items.

public function OrderSuccess()
{
    $cart =$this->cart->contents();

    echo json_encode($cart);
}
Reply
#2

Postman dosen't share the same session as your browser. So if you don't add any before trying to show them. It will be empty.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB