From 0393c8a3ec908cde392ec0f7c45bc1f32350ab93 Mon Sep 17 00:00:00 2001 From: Elyahou Ittah Date: Wed, 28 Oct 2015 21:40:27 +0200 Subject: [PATCH] Fix unique validation rule at creation --- src/SleepingOwl/Admin/FormItems/NamedFormItem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php index c01b4739..4d848fdb 100644 --- a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php +++ b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php @@ -148,7 +148,7 @@ public function getValidationRules() { $table = $this->instance()->getTable(); $item = 'unique:' . $table . ',' . $this->attribute(); - if ($this->instance()->exists()) + if ($this->instance()->exists) { $item .= ',' . $this->instance()->getKey(); }