Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Commit

Permalink
[Fix] error on create permission
Browse files Browse the repository at this point in the history
  • Loading branch information
MrJuliuss committed Nov 16, 2013
1 parent 2faa400 commit a17a4c4
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/models/Permissions/PermissionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit a17a4c4

Please sign in to comment.