ErrorException {#1259
  #message: "Trying to get property 'id' of non-object"
  #code: 0
  #file: "/var/www/app/app/Http/Controllers/HomeController.php"
  #line: 170
  #severity: E_NOTICE
  trace: {
    /var/www/app/app/Http/Controllers/HomeController.php:170 {
      App\Http\Controllers\HomeController->productsByCategory(Request $request, $name, $subCategory = null) …
      › $query = Products::query();$categoryId = $category->id;$query = $query->with(['productDescriptions','productImages','productVariables.productVariablesImages','sizeChartData']);
      arguments: {
        $level: 8
        $message: "Trying to get property 'id' of non-object"
        $file: "/var/www/app/app/Http/Controllers/HomeController.php"
        $line: 170
        $context: array:11 [ …11]
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54 {
      Illuminate\Routing\Controller->callAction($method, $parameters) …
      › {    return $this->{$method}(...array_values($parameters));}
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $name: "+ url +"
        $subCategory: null
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45 {
      Illuminate\Routing\ControllerDispatcher->dispatch(Route $route, $controller, $method) …
      › if (method_exists($controller, 'callAction')) {    return $controller->callAction($method, $parameters);}
      arguments: {
        $method: "productsByCategory"
        $parameters: array:3 [ …3]
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Route.php:262 {
      Illuminate\Routing\Route->runController() …
      › return $this->controllerDispatcher()->dispatch(    $this, $this->getController(), $this->getControllerMethod());
      arguments: {
        $route: Illuminate\Routing\Route {#348 …}
        $controller: App\Http\Controllers\HomeController {#371 …}
        $method: "productsByCategory"
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Route.php:205 {
      Illuminate\Routing\Route->run() …
      › if ($this->isControllerAction()) {    return $this->runController();}
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:695 {
      Illuminate\Routing\Router->Illuminate\Routing\{closure} …
      › return $this->prepareResponse(    $request, $route->run());
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › try {    return $destination($passable);} catch (Throwable $e) {
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/dipeshsukhia/laravel-html-minify/src/Middleware/LaravelMinifyHtml.php:13 {
      DipeshSukhia\LaravelHtmlMinify\Middleware\LaravelMinifyHtml->handle($request, Closure $next) …
      › {    $response = $next($request);    if ($this->isResponseObject($response) && $this->isHtmlResponse($response) && Config::get('htmlminify.default')) {
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:50 {
      Illuminate\Routing\Middleware\SubstituteBindings->handle($request, Closure $next) …
      › 
      ›     return $next($request);}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:78 {
      Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle($request, Closure $next) …
      › ) {    return tap($next($request), function ($response) use ($request) {        if ($this->shouldAddXsrfTokenCookie()) {
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49 {
      Illuminate\View\Middleware\ShareErrorsFromSession->handle($request, Closure $next) …
      › 
      ›     return $next($request);}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:121 {
      Illuminate\Session\Middleware\StartSession->handleStatefulRequest(Request $request, $session, Closure $next) …
      › 
      › $response = $next($request);arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64 {
      Illuminate\Session\Middleware\StartSession->handle($request, Closure $next) …
      › 
      ›     return $this->handleStatefulRequest($request, $session, $next);}
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $session: Illuminate\Session\Store {#451 …}
        $next: Closure($passable) {#434 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37 {
      Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle($request, Closure $next) …
      › {    $response = $next($request);arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:67 {
      Illuminate\Cookie\Middleware\EncryptCookies->handle($request, Closure $next) …
      › {    return $this->encrypt($next($this->decrypt($request)));}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103 {
      Illuminate\Pipeline\Pipeline->then(Closure $destination) …
      › 
      ›     return $pipeline($this->passable);}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:697 {
      Illuminate\Routing\Router->runRouteWithinStack(Route $route, Request $request) …
      ›                         );                    });}
      arguments: {
        $destination: Closure($request) {#429 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:672 {
      Illuminate\Routing\Router->runRoute(Request $request, Route $route) …
      › return $this->prepareResponse($request,    $this->runRouteWithinStack($route, $request));
      arguments: {
        $route: Illuminate\Routing\Route {#348 …}
        $request: Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:636 {
      Illuminate\Routing\Router->dispatchToRoute(Request $request) …
      › {    return $this->runRoute($request, $this->findRoute($request));}
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $route: Illuminate\Routing\Route {#348 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:625 {
      Illuminate\Routing\Router->dispatch(Request $request) …
      › 
      ›     return $this->dispatchToRoute($request);}
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:167 {
      Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure} …
      › 
      ›     return $this->router->dispatch($request);};
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › try {    return $destination($passable);} catch (Throwable $e) {
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/renatomarinho/laravel-page-speed/src/Middleware/PageSpeed.php:30 {
      RenatoMarinho\LaravelPageSpeed\Middleware\PageSpeed->handle($request, Closure $next) …
      › {    $response = $next($request);arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/renatomarinho/laravel-page-speed/src/Middleware/PageSpeed.php:30 {
      RenatoMarinho\LaravelPageSpeed\Middleware\PageSpeed->handle($request, Closure $next) …
      › {    $response = $next($request);arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 {
      Illuminate\Foundation\Http\Middleware\TransformsRequest->handle($request, Closure $next) …
      › 
      ›     return $next($request);}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php:31 {
      Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle($request, Closure $next) …
      › 
      ›     return parent::handle($request, $next);}
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#355 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 {
      Illuminate\Foundation\Http\Middleware\TransformsRequest->handle($request, Closure $next) …
      › 
      ›     return $next($request);}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php:40 {
      Illuminate\Foundation\Http\Middleware\TrimStrings->handle($request, Closure $next) …
      › 
      ›     return parent::handle($request, $next);}
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#356 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 {
      Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle($request, Closure $next) …
      › 
      ›     return $next($request);}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php:86 {
      Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle($request, Closure $next) …
      › 
      ›     return $next($request);}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/fruitcake/laravel-cors/src/HandleCors.php:38 {
      Fruitcake\Cors\HandleCors->handle($request, Closure $next) …
      › if (! $this->shouldRun($request)) {    return $next($request);}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php:39 {
      Illuminate\Http\Middleware\TrustProxies->handle(Request $request, Closure $next) …
      › 
      ›     return $next($request);}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167 {
      Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure} …
      › $carry = method_exists($pipe, $this->method)                ? $pipe->{$this->method}(...$parameters)                : $pipe(...$parameters);
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
        $next: Closure($passable) {#360 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103 {
      Illuminate\Pipeline\Pipeline->then(Closure $destination) …
      › 
      ›     return $pipeline($this->passable);}
      arguments: {
        Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:142 {
      Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter($request) …
      ›                 ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)                ->then($this->dispatchToRouter());}
      arguments: {
        $destination: Closure($request) {#40 …}
      }
    }
    /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:111 {
      Illuminate\Foundation\Http\Kernel->handle($request) …
      › 
      ›     $response = $this->sendRequestThroughRouter($request);} catch (Throwable $e) {
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
      }
    }
    /var/www/app/public/index.php:52 {$response = tap($kernel->handle(    $request = Request::capture()))->send();
      arguments: {
        $request: Illuminate\Http\Request {#44 …}
      }
    }
  }
}