Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

non-nullable Reactants #140

Closed
volkv opened this issue Feb 3, 2020 · 3 comments · Fixed by #231
Closed

non-nullable Reactants #140

volkv opened this issue Feb 3, 2020 · 3 comments · Fixed by #231
Labels

Comments

@volkv
Copy link

volkv commented Feb 3, 2020

Hi. Docs saying

Remove --nullable flag if all models of this type must be reacterable:

$ php artisan love:setup-reacterable --model="App\User"

How should it work if you observe Created event which is fired after model is inserted into DB (which is not possible with non-nullable field)..?

@antonkomarev
Copy link
Member

Hi @volkv! Initially I've thought that it might be useful when you are implementing your own logic. But it will require to implement your own models and observers. To be honest I've never used non-nullable fields.

@antonkomarev
Copy link
Member

antonkomarev commented Feb 8, 2020

I think it will be better to add --not-nullable flag in future versions and make this command to generate nullable fields by default.

@FarhanShares
Copy link

FarhanShares commented Aug 7, 2020

I just checked, it does not work if --nullable is not added while setting up reacters. Seems like the created events is not fired just as @volkv said before.

Same goes for setting up reactants.

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

Successfully merging a pull request may close this issue.

3 participants