Skip to content

Saving & Deleting events not working  #2436

Open
@kemalkanok

Description

@kemalkanok
  • Laravel-mongodb Version: 3.9.0
  • PHP Version: 8.1.2
  • Database Driver & Version:
    linux mongodb 5.0.8

Description:

Hi there,
Whenever i try to use saving and deleting methods i coudn't make it work.

Code:

`

public function saving($model)
{
   dd($model);
}

public function updating($model)
{
   dd($model);
}

public function deleting($model)
{
    
      dd($model);
}

`

Steps to reproduce

1.Create an observer
2.Try using saving method
3.Try using deleting method

Expected behaviour

  1. Saving event should catch the model instance before updating
    2.Deleting event should catch the model instance before deleting

Actual behaviour

1.Saving catches the model instance after updating
2.Deleting event never catches any event.

Logs:

Log

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs investigationNeed investigation about bugs described in issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions