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()
24
24
}
25
25
public function save (array $ options = [])
26
26
{ //both inserts and updates
27
- parent ::save ($ options );
27
+ if (!parent ::save ($ options )){
28
+ return false ;
29
+ }
28
30
Cache::tags (Config::get ('entrust.permission_role_table ' ))->flush ();
31
+ return true ;
29
32
}
30
33
public function delete (array $ options = [])
31
34
{ //soft or hard
32
- parent ::delete ($ options );
35
+ if (!parent ::delete ($ options )){
36
+ return false ;
37
+ }
33
38
Cache::tags (Config::get ('entrust.permission_role_table ' ))->flush ();
39
+ return true ;
34
40
}
35
41
public function restore ()
36
42
{ //soft delete undo's
37
- parent ::restore ();
43
+ if (!parent ::restore ()){
44
+ return false ;
45
+ }
38
46
Cache::tags (Config::get ('entrust.permission_role_table ' ))->flush ();
47
+ return true ;
39
48
}
40
49
41
50
/**
You can’t perform that action at this time.
0 commit comments