Save Text In Db

hi I need save some text in my table in db.

i need to save mesg_type as NOTE in my message table.I used following code for that.


bt it is not save.Ho do I do me pls

$message = new Message;



Also check the model rules at your Message model file. If some other attributes also in required fields, add the values for that too or change the rules accordingly

Even if you wish you leave other attributes just set the validation as false as follows