From f10c4fc34a58c0e3cb6a0339b0be01143afa1aac Mon Sep 17 00:00:00 2001 From: Ivan Novak Date: Wed, 9 Oct 2024 11:48:34 -0500 Subject: [PATCH] [6.x] retrieve the model to allow deletion to fire model events (#381) --- src/Http/Controllers/Inertia/ConnectedAccountController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Http/Controllers/Inertia/ConnectedAccountController.php b/src/Http/Controllers/Inertia/ConnectedAccountController.php index ad662a0..cbd355d 100644 --- a/src/Http/Controllers/Inertia/ConnectedAccountController.php +++ b/src/Http/Controllers/Inertia/ConnectedAccountController.php @@ -31,6 +31,7 @@ public function destroy(Request $request, StatefulGuard $guard, string|int $id): Socialstream::connectedAccountModel()::query() ->where('id', $id) ->where('user_id', $request->user()->id) + ->first() ->delete(); Session::flash('flash.banner', __('Account removed'));