id}"; if (!$cache->has($key)) { $cache->put($key, $router->route('view-product', ['product' => $product->id])); } $product->route = $cache->get($key); return $product; }, $products); // app('queue')->push( // fn($name) => app('logging')->info("Hello {$name}"), // 'Chris', // ); // app('logging')->info('Send a task into the background'); // app('queue')->push( // fn($name) => app('email') // ->to('cgpitt@gmail.com') // ->text("Hello {$name}") // ->send(), // 'Chris', // ); return view('home', [ 'products' => $productsWithRoutes, ]); } }