HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/shop.komma.nl/app/Composers/NavigationViewComposer.php
<?php declare(strict_types=1);


namespace App\Composers;

use App\Cart\ShoppingCart;
use App\Cart\ShoppingCartInterface;
use App\Http\Middleware\WildcardResolver;
use Illuminate\View\View;

class NavigationViewComposer
{
    /**
     * NavigationViewComposer constructor.
     */
    public function __construct()
    {

    }

    /**
     * Bind data to the view.
     *
     * @param  View  $view
     * @return void
     */
    public function compose(View $view) {
        $shoppingCartService = app(ShoppingCartInterface::class);
        $view->with([
            'productWildcardIndexRoute' => WildcardResolver::getWildCardIndexRouteForPageWithCodeName('products'),
            'cartItemCount' => $shoppingCartService->getItemsCount()
        ]);
    }
}