diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 55317ff..14f90f3 100644 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -116,7 +116,13 @@ class OrderController extends Controller 'customer_name' => 'required|string|max:255', 'customer_email' => 'required|email', 'customer_phone' => 'required|string|max:20', - 'shipping_address' => 'required|string|max:500', + 'shipping_street_address' => 'required|string|max:255', + 'shipping_local_area' => 'required|string|max:255', + 'shipping_city' => 'required|string|max:255', + 'shipping_zone' => 'required|string|max:255', + 'shipping_postcode' => 'required|string|max:20', + 'shipping_country' => 'required|string|max:2', + 'shipping_type' => 'required|in:residential,business', 'notes' => 'nullable|string|max:500' ]); @@ -219,7 +225,13 @@ class OrderController extends Controller 'customer_name' => $request->input('customer_name'), 'customer_email' => $request->input('customer_email'), 'customer_phone' => $request->input('customer_phone'), - 'shipping_address' => $request->input('shipping_address'), + 'shipping_street_address' => $request->input('shipping_street_address'), + 'shipping_local_area' => $request->input('shipping_local_area'), + 'shipping_city' => $request->input('shipping_city'), + 'shipping_zone' => $request->input('shipping_zone'), + 'shipping_postcode' => $request->input('shipping_postcode'), + 'shipping_country' => $request->input('shipping_country'), + 'shipping_type' => $request->input('shipping_type'), ]; if ($request->filled('notes')) { diff --git a/resources/views/checkout.blade.php b/resources/views/checkout.blade.php index 9f67110..95aadb8 100644 --- a/resources/views/checkout.blade.php +++ b/resources/views/checkout.blade.php @@ -212,8 +212,41 @@