diff --git a/app/Models/AdslPlan.php b/app/Models/AdslPlan.php index f4a6ec3..ff50ad3 100644 --- a/app/Models/AdslPlan.php +++ b/app/Models/AdslPlan.php @@ -16,7 +16,7 @@ class AdslPlan extends Model 'options.address'=>[ 'request'=>'options.address', 'key'=>'service_address', - 'validation'=>'required|string:10', + 'validation'=>'required|string:10|unique:ab_service__adsl,service_address', 'validation_message'=>'Address is a required field.', ], 'options.notes'=>[ diff --git a/app/Traits/OrderServiceOptions.php b/app/Traits/OrderServiceOptions.php index 26e244f..3913f18 100644 --- a/app/Traits/OrderServiceOptions.php +++ b/app/Traits/OrderServiceOptions.php @@ -28,7 +28,7 @@ trait OrderServiceOptions if ((! isset($this->order_attributes)) || (! isset($this->order_model))) return NULL; - $validate = $request->validate(collect($this->order_attributes)->pluck('validation','request')->toArray()); + $request->validate(collect($this->order_attributes)->pluck('validation','request')->toArray()); $o = new $this->order_model; diff --git a/resources/views/theme/frontend/metronic/order/home.blade.php b/resources/views/theme/frontend/metronic/order/home.blade.php index 38e72a2..892a518 100644 --- a/resources/views/theme/frontend/metronic/order/home.blade.php +++ b/resources/views/theme/frontend/metronic/order/home.blade.php @@ -9,7 +9,7 @@

Order Service

- + @if ($errors->count()))

There were errors with your order, please try again.

@endif