+ @endif
\ No newline at end of file
From fce2040e01a66fea5032b62bb98aa32ee0b23f32 Mon Sep 17 00:00:00 2001
From: Sgy157
Date: Sun, 10 Dec 2023 16:06:25 +0000
Subject: [PATCH 2/8] moved to folder, view is now products.show
---
.../resources/views/products/show.blade.php | 276 ++++++++++++++++++
1 file changed, 276 insertions(+)
create mode 100644 WoodLess/resources/views/products/show.blade.php
diff --git a/WoodLess/resources/views/products/show.blade.php b/WoodLess/resources/views/products/show.blade.php
new file mode 100644
index 00000000..7eedb215
--- /dev/null
+++ b/WoodLess/resources/views/products/show.blade.php
@@ -0,0 +1,276 @@
+@extends('layouts.base')
+@section('title', 'WoodLess - '. $product->title)
+
+@section('style')
+
+@endsection
+
+@php
+ if ($product->id == 1){
+ //Test code to give a product a category ('1' being the first category the the category table)
+ //$product->categories()->attach(2);
+ }
+ /*
+ These variables are declared in ProductController and are used here.
+
+ $product - A row from the 'products' table, Eloquent model (?)
+ $attributes - The product's attributes decoded from JSON
+ $categories - The product's categories stored in the pivot table 'categories_product'
+ $productImages - The file path of each image used for the product, stored in a String array
+ $reviews - Rows from the 'reviews' table that match this product's id, stored in an Eloquent model (?) array, currently paginated by 5
+ $finalCost - Gets the final price, taking into account discount
+ */
+@endphp
+
+@section('content')
+
+
+ @foreach ($similarProducts as $similarProduct)
+
{{$similarProduct->title}}
+ @endforeach
+
+
+
+
+
+
+ @include('reviews.load')
+
+@endsection
+
From 77e8247a5403eef45b34d95022a53efa0978f3bc Mon Sep 17 00:00:00 2001
From: Sgy157
Date: Sun, 10 Dec 2023 16:06:38 +0000
Subject: [PATCH 3/8] Moved to products folder
---
.../resources/views/product-display.blade.php | 276 ------------------
1 file changed, 276 deletions(-)
delete mode 100644 WoodLess/resources/views/product-display.blade.php
diff --git a/WoodLess/resources/views/product-display.blade.php b/WoodLess/resources/views/product-display.blade.php
deleted file mode 100644
index 7eedb215..00000000
--- a/WoodLess/resources/views/product-display.blade.php
+++ /dev/null
@@ -1,276 +0,0 @@
-@extends('layouts.base')
-@section('title', 'WoodLess - '. $product->title)
-
-@section('style')
-
-@endsection
-
-@php
- if ($product->id == 1){
- //Test code to give a product a category ('1' being the first category the the category table)
- //$product->categories()->attach(2);
- }
- /*
- These variables are declared in ProductController and are used here.
-
- $product - A row from the 'products' table, Eloquent model (?)
- $attributes - The product's attributes decoded from JSON
- $categories - The product's categories stored in the pivot table 'categories_product'
- $productImages - The file path of each image used for the product, stored in a String array
- $reviews - Rows from the 'reviews' table that match this product's id, stored in an Eloquent model (?) array, currently paginated by 5
- $finalCost - Gets the final price, taking into account discount
- */
-@endphp
-
-@section('content')
-