Hello Guys I've been following this Laravel/livewire E-Commerce series and I encountered this frustrating error. Everything seems to be okay with the code. I just want to show the grand total. But I cannot see it on my page. There is no any error showing.
Actually I am kind a newbie. Can I get a solution?
And I don't have proper idea what the meaning of @if(Session::has('checkout')) is
When working on web sites you have something that is called a session. This is for instance where we store the data about the user being logged in. This is shared between the backend (php) and the browser.
You can add stuff into this session yourself, to store things between page visits (almost like a tiny database).
session(['checkout' => $data]);
So somewhere on a previous page, I assume you have something like the above code (might not be 100% identical, but has the word session in it). And your code simply checks if that session is set, and assumes its an array with a total key
@Salman98 I don't see your session store in checkout component. Only see session()->get('checkout'). Where did you store session('checkout'). You need to store it somewhere and check with session::has('checkout') your grand total should appear.