From a17a4c41e93f06dd3a44026445e647e1f1943998 Mon Sep 17 00:00:00 2001 From: MrJuliuss Date: Sat, 16 Nov 2013 10:38:31 +0100 Subject: [PATCH] [Fix] error on create permission --- src/models/Permissions/PermissionProvider.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/models/Permissions/PermissionProvider.php b/src/models/Permissions/PermissionProvider.php index 66efdfa..4cc3e60 100644 --- a/src/models/Permissions/PermissionProvider.php +++ b/src/models/Permissions/PermissionProvider.php @@ -17,18 +17,11 @@ class PermissionProvider */ public function createPermission($attributes) { - $validator = Validator::make($attributes, Config::get('syntara::validator.permissions.create')); + $permission = $this->createModel(); + $permission->fill($attributes); + $permission->save(); - if(!$validator->fails()) - { - $permission = $this->createModel(); - $permission->fill($attributes); - $permission->save(); - - return $permission; - } - - return null; + return $permission; } /**