File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ All Notable changes to `laravel-permission-mongodb` will be documented in this f
77### Added
88 - Support of Laravel 7.x
99
10+ v2.1
1011## 2.0.1 - 2020-02-23
1112
1213### Changed
Original file line number Diff line number Diff line change 3030 }
3131 ],
3232 "require" : {
33- "php" : " >=7.0" ,
34- "illuminate/auth" : " ^5.2|^6.0|^7.0" ,
35- "illuminate/container" : " ^5.2|^6.0|^7.0" ,
36- "illuminate/contracts" : " ^5.2|^6.0|^7.0" ,
33+ "php" : " >=7.2" ,
34+ "illuminate/auth" : " ^6.0" ,
35+ "illuminate/container" : " ^6.0" ,
36+ "illuminate/contracts" : " ^6.0" ,
37+
3738 "jenssegers/mongodb" : " ^3.0"
3839 },
3940 "require-dev" : {
Original file line number Diff line number Diff line change 22
33namespace Maklad \Permission ;
44
5- use Illuminate \Contracts \Auth \Access \Gate ;
65use Illuminate \Support \ServiceProvider ;
76use Illuminate \View \Compilers \BladeCompiler ;
87use Maklad \Permission \Contracts \PermissionInterface as Permission ;
98use Maklad \Permission \Contracts \RoleInterface as Role ;
109use Maklad \Permission \Directives \PermissionDirectives ;
10+ use Illuminate \Support \Facades \DB ;
1111
1212/**
1313 * Class PermissionServiceProvider
@@ -41,9 +41,11 @@ public function boot()
4141
4242 $ this ->registerModelBindings ();
4343
44- $ this ->app ->afterResolving (Gate::class, function () {
44+ try {
45+ DB ::connection ()->getPdo ();
4546 app (PermissionRegistrar::class)->registerPermissions ();
46- });
47+ } catch (\Exception $ e ) {
48+ }
4749 }
4850
4951 public function register ()
You can’t perform that action at this time.
0 commit comments