File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -24,18 +24,27 @@ public function cachedPermissions()
2424 }
2525 public function save (array $ options = [])
2626 { //both inserts and updates
27- parent ::save ($ options );
27+ if (!parent ::save ($ options )){
28+ return false ;
29+ }
2830 Cache::tags (Config::get ('entrust.permission_role_table ' ))->flush ();
31+ return true ;
2932 }
3033 public function delete (array $ options = [])
3134 { //soft or hard
32- parent ::delete ($ options );
35+ if (!parent ::delete ($ options )){
36+ return false ;
37+ }
3338 Cache::tags (Config::get ('entrust.permission_role_table ' ))->flush ();
39+ return true ;
3440 }
3541 public function restore ()
3642 { //soft delete undo's
37- parent ::restore ();
43+ if (!parent ::restore ()){
44+ return false ;
45+ }
3846 Cache::tags (Config::get ('entrust.permission_role_table ' ))->flush ();
47+ return true ;
3948 }
4049
4150 /**
You can’t perform that action at this time.
0 commit comments