I am using Laravel 9, updating/upated boot method not working. When I use deleting then updating/upated boot method running to update delete_at and deleted_by field value but when I try to update any thing doesn't work.
self::updating(function ($model) {
$user = Auth::user();
$model->updated_by = $user->id;
});
$data = array(
'title' => $request->title,
'account_type' => $request->account_type
);
Head::find($request->head_id)->update($data);