Skip to content

Commit 2a97ed4

Browse files
authored
Merge pull request #34 from rickyjohnston/main
Add Laravel 11 support
2 parents 4899dc9 + cbe9c9a commit 2a97ed4

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ This package will auto-register its service provider.
6060
First, publish the package's files:
6161

6262
1. Publish the `CookiesServiceProvider` file: `php artisan vendor:publish --tag=laravel-cookie-consent-service-provider`
63-
2. Add the Service Provider to the `providers` array in `config/app.php`:
63+
2. Register the Service Provider in your application. For applications using Laravel 9 or 10, add the Service Provider to the `providers` array in `config/app.php`:
6464
```php
6565
'providers' => ServiceProvider::defaultProviders()->merge([
6666
// ...
@@ -69,6 +69,14 @@ First, publish the package's files:
6969
App\Providers\CookiesServiceProvider::class,
7070
])->toArray(),
7171
```
72+
73+
For applications running Laravel 11, add the Service Provider to the array in `bootstrap/providers.php`:
74+
```php
75+
return [
76+
App\Providers\AppServiceProvider::class,
77+
App\Providers\CookiesServiceProvider::class,
78+
];
79+
```
7280
3. Publish the configuration file: `php artisan vendor:publish --tag=laravel-cookie-consent-config`
7381

7482
If you want to customize the consent modal's views:

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
],
2323
"require": {
2424
"php": ">=8.1",
25-
"laravel/framework": "^9|^10"
25+
"laravel/framework": "^9|^10|^11"
2626
},
2727
"require-dev": {
2828
"pestphp/pest": "^2.6",
2929
"mockery/mockery": "^1.5",
30-
"orchestra/testbench": "^8.5"
30+
"orchestra/testbench": "^8.5|^9.0"
3131
},
3232
"config": {
3333
"allow-plugins": {

0 commit comments

Comments
 (0)