Split browser.php to commands with routes.

This commit is contained in:
Krzysztof Płaczek committed 2024-10-13 20:44:14 +02:00
1 parent e13a0acce1
commit f2e6cba2f5
12 files changed
+281 -40

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
<?php
namespace Krzysiej\RyobiCrawler\Controller;
use Krzysiej\RyobiCrawler\Models\Product;
final class IndexController extends BaseController
{
public function __invoke(): void
{
$products = Product::with('price')->orderByDesc('starred')->orderByDesc('created_by')->get();
$this->twig->display('productList.html.twig', ['products' => $products]);
}
}