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.
$message->mesg_type='NOTE';
bt it is not save.Ho do I do that.help me pls
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.
$message->mesg_type='NOTE';
bt it is not save.Ho do I do that.help me pls
$message = new Message;
$message->mesg_type='NOTE';
$message->save();
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
$message->save(false)