From 5d2a83fceb68e2163071d4be74b3bbafbaebc9ea Mon Sep 17 00:00:00 2001 From: Ivan Novak Date: Tue, 8 Oct 2024 10:58:22 -0500 Subject: [PATCH] retrieve the model to allow deletion to fire model events --- 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'));