File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ public function attachPermission($permission)
170
170
}
171
171
172
172
if (is_array ($ permission )) {
173
- $ permission = $ permission[ ' id ' ] ;
173
+ return $ this -> attachPermissions ( $ permission) ;
174
174
}
175
175
176
176
$ this ->perms ()->attach ($ permission );
@@ -185,11 +185,13 @@ public function attachPermission($permission)
185
185
*/
186
186
public function detachPermission ($ permission )
187
187
{
188
- if (is_object ($ permission ))
188
+ if (is_object ($ permission )) {
189
189
$ permission = $ permission ->getKey ();
190
+ }
190
191
191
- if (is_array ($ permission ))
192
- $ permission = $ permission ['id ' ];
192
+ if (is_array ($ permission )) {
193
+ return $ this ->detachPermissions ($ permission );
194
+ }
193
195
194
196
$ this ->perms ()->detach ($ permission );
195
197
}
You can’t perform that action at this time.
0 commit comments