Commit c10511e3 authored by Viral Solani's avatar Viral Solani

Resolve Permission Module Errors

parent 1815e6db
...@@ -74,7 +74,7 @@ class PermissionRepository extends BaseRepository ...@@ -74,7 +74,7 @@ class PermissionRepository extends BaseRepository
* *
* @return bool * @return bool
*/ */
public function update(Model $permission, array $input) public function update($permission, array $input)
{ {
if ($this->query()->where('name', $input['name'])->where('id', '!=', $permission->id)->first()) { if ($this->query()->where('name', $input['name'])->where('id', '!=', $permission->id)->first()) {
throw new GeneralException(trans('exceptions.backend.access.permissions.already_exists')); throw new GeneralException(trans('exceptions.backend.access.permissions.already_exists'));
...@@ -104,7 +104,7 @@ class PermissionRepository extends BaseRepository ...@@ -104,7 +104,7 @@ class PermissionRepository extends BaseRepository
* *
* @return bool * @return bool
*/ */
public function delete(Model $permission) public function delete($permission)
{ {
DB::transaction(function () use ($permission) { DB::transaction(function () use ($permission) {
if ($permission->delete()) { if ($permission->delete()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment