non-nullable Reactants
volkv opened this issue · comments
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)..?
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.
I think it will be better to add --not-nullable
flag in future versions and make this command to generate nullable fields by default.
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.