Skip to content

Commit

Permalink
[6.x] retrieve the model to allow deletion to fire model events (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivannovak authored Oct 9, 2024
1 parent 42b4341 commit f10c4fc
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit f10c4fc

Please sign in to comment.