Skip to content

Commit 0c260f9

Browse files
committed
nitpicks
1 parent 7f8a398 commit 0c260f9

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

CHANGELOG.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
All notable changes to `laravel-permission` will be documented in this file
44

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
710

811
## 2.4.0 -2017-08-05
912
- add `PermissionMiddleware` and `RoleMiddleware`
1013

1114
## 2.3.2 - 2017-07-28
12-
- allow `hasAnyPmerission` to take an array of permissions
15+
- allow `hasAnyPermission` to take an array of permissions
1316

1417
## 2.3.1 - 2017-07-27
1518
- fix commands not using custom models
@@ -27,29 +30,23 @@ All notable changes to `laravel-permission` will be documented in this file
2730
- fixed a bug that didn't allow you to assign a role or permission when using multiple guards
2831

2932
## 2.1.4 - 2017-05-10
30-
3133
- add `model_type` to the primary key of tables that use a polymorphic relationship
3234

3335
## 2.1.3 - 2017-04-21
34-
3536
- fixed a bug where the role()/permission() relation to user models would be saved incorrectly
3637
- added users() relation on Permission and Role
3738

3839
## 2.1.2 - 2017-04-20
39-
4040
- fix a bug where the `role()`/`permission()` relation to user models would be saved incorrectly
4141
- add `users()` relation on `Permission` and `Role`
4242

4343
## 2.0.2 - 2017-04-13
44-
4544
- check for duplicates when adding new roles and permissions
4645

4746
## 2.0.1 - 2017-04-11
48-
4947
- fix the order of the `foreignKey` and `relatedKey` in the relations
5048

5149
## 2.0.0 - 2017-04-10
52-
5350
- cache expiration is now configurable and set to one day by default
5451
- roles and permissions can now be assigned to any model through the `HasRoles` trait
5552
- removed deprecated `hasPermission` method

src/Traits/HasRoles.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,10 @@ trait HasRoles
1414

1515
public static function bootHasRoles()
1616
{
17-
// Delete associated relations roles/permissions
1817
static::deleting(function ($model) {
1918
$model->roles()->detach();
2019
$model->permissions()->detach();
2120
});
22-
23-
// Eager load relations by default
24-
static::addGlobalScope('relations', function (Builder $builder) {
25-
$builder->with(['roles', 'permissions']);
26-
});
2721
}
2822

2923
/**

0 commit comments

Comments
 (0)