CRM - tp 1,2, et 3 bientot fini refresh

This commit is contained in:
2026-09-16 12:08:49 +02:00
parent 5533735d5d
commit fc4c55546f
79 changed files with 274 additions and 11123 deletions
@@ -7,36 +7,43 @@ use Illuminate\Http\Request;
class ProductController extends Controller
{
public function index(){
$products = [
[
'name' => 'Ordinateur portable',
'price' => 899,
'stock' => 12
],
[
'name' => 'Écran',
'price' => 249,
'stock' => 7
],
[
'name' => 'Clavier',
'price' => 79,
'stock' => 25
],
[
'name' => 'Souris',
'price' => 39,
'stock' => 42
],
[
'name' => 'Webcam',
'price' => 99,
'stock' => 4
]
];
return view('products.index', ['products' => $products]);
$products = Product::all();
return view('product.index', [
'product' => $products
]);
// $products = [
// [
// 'name' => 'Ordinateur portable',
// 'price' => 899,
// 'stock' => 12
// ],
// [
// 'name' => 'Écran',
// 'price' => 249,
// 'stock' => 7
// ],
// [
// 'name' => 'Clavier',
// 'price' => 79,
// 'stock' => 25
// ],
// [
// 'name' => 'Souris',
// 'price' => 39,
// 'stock' => 42
// ],
// [
// 'name' => 'Webcam',
// 'price' => 99,
// 'stock' => 4
// ]
// ];
// return view('products.index', ['products' => $products]);
}
// }
}
}