Skip to content

Commit 2525fe1

Browse files
committed
5.7.1
1 parent 0fa10be commit 2525fe1

13 files changed

+82
-55
lines changed

bun.lockb

0 Bytes
Binary file not shown.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,5 @@
173173
},
174174
"minimum-stability": "dev",
175175
"prefer-stable": true,
176-
"version": "5.7.0"
176+
"version": "5.7.1"
177177
}

package-lock.json

Lines changed: 32 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@babel/preset-env": "^7.27.2",
1616
"@tailwindcss/container-queries": "^0.1.1",
1717
"@tailwindcss/typography": "^0.5.16",
18-
"@types/lodash": "^4.17.16",
18+
"@types/lodash": "^4.17.17",
1919
"@vue/babel-plugin-jsx": "^1.4.0",
2020
"@vue/babel-preset-jsx": "^1.4.0",
2121
"@vue/compiler-sfc": "^3.5.14",
@@ -41,7 +41,7 @@
4141
"@floating-ui/vue": "^1.1.6",
4242
"@headlessui/vue": "^1.7.23",
4343
"@heroicons/vue": "^2.2.0",
44-
"@inertiajs/vue3": "^2.0.10",
44+
"@inertiajs/vue3": "^2.0.11",
4545
"@popperjs/core": "^2.11.8",
4646
"@vue/compat": "^3.5.14",
4747
"@vueuse/core": "^10.11.1",

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"/ui.js": "/ui.js?id=b8df0ca1161b86cfb1aca2b3b642e584",
44
"/manifest.js": "/manifest.js?id=3267e5c99fd7b729e2f38ec55b50397d",
55
"/app.css": "/app.css?id=4ac240e9b4c482451bf95d4161751414",
6-
"/vendor.js": "/vendor.js?id=94d7e26e8c94fdf223cf5f0a163c0b3d",
6+
"/vendor.js": "/vendor.js?id=ed85a48ec921ddfd0f403acdd3b4d92b",
77
"/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty10iurt9w6fk2a.woff2": "/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty10iurt9w6fk2a.woff2?id=c8390e146be0a3c8a5498355dec892ae",
88
"/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty14iurt9w6fk2a.woff2": "/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty14iurt9w6fk2a.woff2?id=b0735c7dd6126471acbaf9d6e9f5e41a",
99
"/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty1ciurt9w6fk2a.woff2": "/fonts/snunitosansv11pe01mimslybiv1o4x1m8cce4g1pty1ciurt9w6fk2a.woff2?id=7c1fb232e3050e36dcc1aee61f1d0c06",

public/vendor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Console/PolicyMakeCommand.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,17 @@ protected function getStub()
121121
return $this->resolveStubPath('/stubs/policy.stub');
122122
}
123123

124+
/** {@inheritDoc} */
125+
#[\Override]
126+
protected function resolveStubPath($stub)
127+
{
128+
if (file_exists($customPath = $this->laravel->basePath('/stubs/nova/policy.stub'))) {
129+
return $customPath;
130+
}
131+
132+
return parent::resolveStubPath($stub);
133+
}
134+
124135
/** {@inheritDoc} */
125136
#[\Override]
126137
protected function userProviderModel()

src/Http/Controllers/NotificationDeleteAllController.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Illuminate\Routing\Controller;
77
use Laravel\Nova\Http\Requests\NotificationRequest;
88
use Laravel\Nova\Notifications\Notification;
9-
use Laravel\Nova\Nova;
109

1110
class NotificationDeleteAllController extends Controller
1211
{
@@ -15,10 +14,10 @@ class NotificationDeleteAllController extends Controller
1514
*/
1615
public function __invoke(NotificationRequest $request): JsonResponse
1716
{
18-
$userId = Nova::user($request)->getKey();
19-
20-
dispatch(static function () use ($userId) {
21-
Notification::whereNotifiableId($userId)->delete();
17+
dispatch(static function () use ($request) {
18+
Notification::whereNotifiableId(
19+
$request->user()->getKey()
20+
)->delete();
2221
})->afterResponse();
2322

2423
return response()->json();

src/Http/Controllers/NotificationDeleteController.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ class NotificationDeleteController extends Controller
1212
/**
1313
* Mark the given notification as read.
1414
*/
15-
public function __invoke(NotificationRequest $request): JsonResponse
15+
public function __invoke(NotificationRequest $request, string|int $notification): JsonResponse
1616
{
17-
$notification = Notification::findOrFail($request->notification);
17+
$notification = Notification::whereNotifiableId(
18+
$request->user()->getKey()
19+
)->findOrFail($notification);
20+
1821
$notification->update(['read_at' => now()]);
1922
$notification->delete();
2023

src/Http/Controllers/NotificationReadController.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ class NotificationReadController extends Controller
1212
/**
1313
* Mark the given notification as read.
1414
*/
15-
public function __invoke(NotificationRequest $request): JsonResponse
15+
public function __invoke(NotificationRequest $request, string|int $notification): JsonResponse
1616
{
17-
$notification = Notification::findOrFail($request->notification);
17+
$notification = Notification::query()
18+
->whereNotifiableId($request->user()->getKey())
19+
->findOrFail($notification);
20+
1821
$notification->update(['read_at' => now()]);
1922

2023
return response()->json();

0 commit comments

Comments
 (0)