Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Possible bug in model observer registration #34

Closed
a21ns1g4ts opened this issue Nov 8, 2024 · 4 comments
Closed

Possible bug in model observer registration #34

a21ns1g4ts opened this issue Nov 8, 2024 · 4 comments

Comments

@a21ns1g4ts
Copy link
Contributor

I couldn't understand why there's another level of interaction here if the value of configuration is a simple array. Is there a bug?

@MarJose123
Copy link
Owner

Did you encounter an issue related to that?

@a21ns1g4ts
Copy link
Contributor Author

a21ns1g4ts commented Nov 8, 2024

image
Then, why not this ?

 foreach ($MODELS as $MODEL) {
        if (class_exists($MODEL)) {
            $MODEL::observe(ModelObserver::class);
        }
    }

@MarJose123
Copy link
Owner

can you send PR? thanks.

@a21ns1g4ts
Copy link
Contributor Author

a21ns1g4ts commented Nov 14, 2024

resolved in 35

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants