Skip to content

Commit

Permalink
Merge pull request #26 from etsvThor/bugfix/laravel-data-upgrade
Browse files Browse the repository at this point in the history
follow upgrade guide laravel data v3 to v4
  • Loading branch information
niekbr authored Apr 18, 2024
2 parents 4b46984 + 5a9731f commit 448854e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## 1.0.1
- Follow upgrade guide for laravel-data
- Drop support for laravel 9
- Drop support for `spatie/laravel-data` v3

## 1.0.0
- Support laravel 11
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"require": {
"php": "~8.1.0 | ~8.2.0 | ~8.3.0",
"spatie/laravel-permission": "^4.0 | ^5.0 | ^6.0",
"laravel/framework": "^9.0 | ^10.0 | ^11.0",
"laravel/framework": "^10.0 | ^11.0",
"laravel/socialite": "^5.1",
"spatie/laravel-data": "^3.9 | ^4.0"
"spatie/laravel-data": "^4.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Controllers/WebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use EtsvThor\BifrostBridge\Jobs\ProcessWebhookBifrost;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Spatie\LaravelData\DataCollection;

class WebhookController
{
Expand All @@ -32,7 +33,7 @@ public function bifrost(Request $request): JsonResponse
}

ProcessWebhookBifrost::dispatch(
BifrostRoleData::collection($request->get('roles')),
BifrostRoleData::collect($request->get('roles'), DataCollection::class),
);

return response()->json(['success' => true]);
Expand Down

0 comments on commit 448854e

Please sign in to comment.