[Idea] Disallow mass assignment rule
Wulfheart opened this issue · comments
Alex commented
Some Laravel code guides discourage the usage of mass assignment. Would you be willing to merge a rule which lints the use of it?
Jacob Baker-Kretzmar commented
Personally, no. I much prefer mass assignment with create()
and update()
over the individual property assignment in that example, and we already have a rule that lints $request->all()
to encourage being explicit about passing around request input. Open to hearing what others think though.
Anthony Clark commented
I agree with @bakerkretzmar here, thanks for the suggestion @Wulfheart.
This can always be added to a custom preset for your own use 👍