File tree 2 files changed +6
-15
lines changed
2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All notable changes to ` laravel-permission ` will be documented in this file
4
4
5
- ## 2.4.1 -2017-08-05
6
- - Fix processing of pipe symbols in ` @hasanyrole ` and ` @hasallroles ` Blade directives
5
+ ## 2.4.2 - 2017-08-11
6
+ - automatically detach roles and permissions when a user gets deleted
7
+
8
+ ## 2.4.1 - 2017-08-05
9
+ - fix processing of pipe symbols in ` @hasanyrole ` and ` @hasallroles ` Blade directives
7
10
8
11
## 2.4.0 -2017-08-05
9
12
- add ` PermissionMiddleware ` and ` RoleMiddleware `
10
13
11
14
## 2.3.2 - 2017-07-28
12
- - allow ` hasAnyPmerission ` to take an array of permissions
15
+ - allow ` hasAnyPermission ` to take an array of permissions
13
16
14
17
## 2.3.1 - 2017-07-27
15
18
- fix commands not using custom models
@@ -27,29 +30,23 @@ All notable changes to `laravel-permission` will be documented in this file
27
30
- fixed a bug that didn't allow you to assign a role or permission when using multiple guards
28
31
29
32
## 2.1.4 - 2017-05-10
30
-
31
33
- add ` model_type ` to the primary key of tables that use a polymorphic relationship
32
34
33
35
## 2.1.3 - 2017-04-21
34
-
35
36
- fixed a bug where the role()/permission() relation to user models would be saved incorrectly
36
37
- added users() relation on Permission and Role
37
38
38
39
## 2.1.2 - 2017-04-20
39
-
40
40
- fix a bug where the ` role() ` /` permission() ` relation to user models would be saved incorrectly
41
41
- add ` users() ` relation on ` Permission ` and ` Role `
42
42
43
43
## 2.0.2 - 2017-04-13
44
-
45
44
- check for duplicates when adding new roles and permissions
46
45
47
46
## 2.0.1 - 2017-04-11
48
-
49
47
- fix the order of the ` foreignKey ` and ` relatedKey ` in the relations
50
48
51
49
## 2.0.0 - 2017-04-10
52
-
53
50
- cache expiration is now configurable and set to one day by default
54
51
- roles and permissions can now be assigned to any model through the ` HasRoles ` trait
55
52
- removed deprecated ` hasPermission ` method
Original file line number Diff line number Diff line change @@ -14,16 +14,10 @@ trait HasRoles
14
14
15
15
public static function bootHasRoles ()
16
16
{
17
- // Delete associated relations roles/permissions
18
17
static ::deleting (function ($ model ) {
19
18
$ model ->roles ()->detach ();
20
19
$ model ->permissions ()->detach ();
21
20
});
22
-
23
- // Eager load relations by default
24
- static ::addGlobalScope ('relations ' , function (Builder $ builder ) {
25
- $ builder ->with (['roles ' , 'permissions ' ]);
26
- });
27
21
}
28
22
29
23
/**
You can’t perform that action at this time.
0 commit comments