Is it possible to have an attribute that is only mass-assignable during the creation of a model object?
For example, the username
attribute should be mass-assignable when creating the object, but not after that (it should be read-only).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…