alijumaan / laravel-ecommerce

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion within the foreach

trondhuso opened this issue · comments

foreach (Cart::content() as $item) {

It might be a good idea to create a variable with the content of Cart::content()

Back in my early days with PHP, I learned that doing it the way it is on the current like, PHP would go and look up all the time.
By storing the content in a variable you bypass this behaviour - if this is still the case for PHP in 2022.

Just something to consider.

Please close this issue. @alijumaan