Skip to content

Commit c9c1bf8

Browse files
committed
Add support for Laravel 11
1 parent 68c832f commit c9c1bf8

File tree

5 files changed

+20
-18
lines changed

5 files changed

+20
-18
lines changed

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
## 2 Dependencies
2020

21-
- laravel 8+ | 9+ | 10+
21+
- laravel 8+ | 9+ | 10+ | 11+
2222
- Bootstrap 4 for styling
2323
- JQuery
2424
- php >= 7.3.0
@@ -28,25 +28,17 @@
2828

2929
**Note!**
3030

31-
Version **3.x** is for laravel **8+**, **9+**, **10+**.
31+
Version **3.x** is for laravel **8+**, **9+**, **10+**, **11+**.
3232

3333
Version **2.x** is for laravel **6** or **7**. You can use branch `laravel67-rbac` with **2.x** versions.
3434

3535
### 3.1 General installation from remote repository
3636

3737
Run the composer command:
3838

39-
`composer require itstructure/laravel-rbac "~3.0.11"`
39+
`composer require itstructure/laravel-rbac "~3.0.12"`
4040

41-
### 3.2 App config
42-
43-
Add to application `config/app.php` file to section **providers**:
44-
45-
```php
46-
Itstructure\LaRbac\RbacServiceProvider::class,
47-
```
48-
49-
### 3.3 Next internal installation steps
41+
### 3.2 Next internal installation steps
5042

5143
**Notes:**
5244

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
### CHANGE LOG:
22

3+
**3.0.12 March 20, 2024:**
4+
- Add support for Laravel 11.
5+
36
**3.0.11 February 04, 2024:**
47
- Change dependence on Laravel Grid View.
58

composer.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"minimum-stability": "dev",
1616
"prefer-stable": true,
1717
"require": {
18-
"laravel/framework": "^8.0|^9.0|^10.0",
18+
"laravel/framework": "^8.0|^9.0|^10.0|^11.0",
1919
"php": ">=7.3.0",
20-
"itstructure/laravel-grid-view": "^1.1.0"
20+
"itstructure/laravel-grid-view": "^1.1.1"
2121
},
2222
"classmap": [
2323
"database/migrations",
@@ -30,5 +30,12 @@
3030
"psr-4": {
3131
"Itstructure\\LaRbac\\": "src"
3232
}
33+
},
34+
"extra": {
35+
"laravel": {
36+
"providers": [
37+
"Itstructure\\LaRbac\\RbacServiceProvider"
38+
]
39+
}
3340
}
3441
}

database/migrations/2020_07_11_151834_create_user_role_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function up()
4343

4444
$userModelKeyName = $userNewModel->getAuthIdentifierName();
4545

46-
$userTablePrimaryType = Schema::getConnection()->getDoctrineColumn($userModelTable, $userModelKeyName)->getType()->getName();
46+
$userTablePrimaryType = Schema::getConnection()->getSchemaBuilder()->getColumnType($userModelTable, $userModelKeyName);
4747

4848
Helper::checkUserTablePrimaryType($userTablePrimaryType, $userModelKeyName, $userModelTable);
4949

src/RbacServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ public function boot()
6060
*/
6161
private function registerCommands(): void
6262
{
63-
$this->commands(Commands\PublishCommand::class);
64-
$this->commands(Commands\DatabaseCommand::class);
65-
$this->commands(Commands\AdminCommand::class);
63+
$this->commands(PublishCommand::class);
64+
$this->commands(DatabaseCommand::class);
65+
$this->commands(AdminCommand::class);
6666
}
6767

6868

0 commit comments

Comments
 (0)