File tree Expand file tree Collapse file tree 4 files changed +18
-14
lines changed
Expand file tree Collapse file tree 4 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 22
33All Notable changes to ` laravel-permission-mongodb ` will be documented in this file.
44
5+ ## 3.0.0 - 2020-09-27
6+
7+ ### Added
8+ - Support of Laravel 7.x
9+
510## 2.0.1 - 2020-02-23
611
712### Changed
@@ -10,7 +15,7 @@ All Notable changes to `laravel-permission-mongodb` will be documented in this f
1015## 2.0.0 - 2020-02-20
1116
1217### Added
13- - Support of Laravel 6
18+ - Support of Laravel 6.x
1419
1520## 1.10.1 - 2018-09-16
1621
Original file line number Diff line number Diff line change @@ -64,16 +64,13 @@ $user->can('edit articles');
6464## Installation
6565
6666### Laravel
67- This package can be used in Laravel 6.x and up.
6867
6968You can install the package via composer:
7069
7170``` bash
7271composer require mostafamaklad/laravel-permission-mongodb
7372```
7473
75- > For Laravel 5 use version 1.x
76-
7774You can publish [ the migration] ( database/migrations/create_permission_collections.php.stub ) with:
7875
7976``` bash
Original file line number Diff line number Diff line change 3030 }
3131 ],
3232 "require" : {
33- "php" : " >=7.1 " ,
34- "illuminate/auth" : " ^6.0" ,
35- "illuminate/container" : " ^6.0" ,
36- "illuminate/contracts" : " ^6.0" ,
33+ "php" : " >=7.2 " ,
34+ "illuminate/auth" : " ^6.0|^7.0 " ,
35+ "illuminate/container" : " ^6.0|^7.0 " ,
36+ "illuminate/contracts" : " ^6.0|^7.0 " ,
3737 "jenssegers/mongodb" : " ^3.0"
3838 },
3939 "require-dev" : {
40- "monolog/monolog" : " ^1.23" ,
41- "orchestra/testbench" : " ^4 .0" ,
42- "phpunit/phpunit" : " ^8.0" ,
40+ "monolog/monolog" : " ^1.23|^2.0 " ,
41+ "orchestra/testbench" : " ^3.2|^4.0|^5 .0" ,
42+ "phpunit/phpunit" : " ^5.7|^6.0|^7.0|^ 8.0" ,
4343 "squizlabs/php_codesniffer" : " ^3.1"
4444 },
4545 "autoload" : {
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