๐ข๐ป๐ฒ ๐ก๐๐น๐น๐ฎ๐ฏ๐น๐ฒ ๐ง๐ถ๐บ๐ฒ๐๐๐ฎ๐บ๐ฝ, ๐๐ผ๐๐ฟ ๐๐ฐ๐ฐ๐ผ๐๐ป๐ ๐ฆ๐๐ฎ๐๐ฒ๐
Stop using status columns in your Laravel user tables. You waste space and create bugs.
Use one nullable timestamp to track status. This method keeps your data clean.
Here is how it works:
- No email verification: User is pending.
- Email verified and no suspension date: User is active.
- Email verified and has suspension date: User is suspended.
- No email verification and has suspension date: User is banned.
You get four states with two columns. Your database stays small. Your logic stays simple.