问题描述
我想问一些在Laravel中创建新数据时如何创建新字段的方法,为显示结果,我在下面写下了我的期望:
// method to insert a new data
function create_data_example(Request $some_data) {
$new_data = new MyModel();
$new_data = $some_data->name;
$new_data = $some_data->age;
$new_data = $some_data->gender;
$new_data->save();
}
// the result just an insert a new data to field name,age,and gender
如果我使用上面相同的方法编写一些代码来插入新字段(示例字段是业余爱好)并将新数据插入到新字段(业余爱好)中,那又如何呢?谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)