码迷,mamicode.com
首页 > 其他好文 > 详细

laravel 数据模型方法

时间:2018-07-04 13:40:09      阅读:267      评论:0      收藏:0      [点我收藏+]

标签:groupby   sel   date   fse   distinct   数据   字段   upd   laravel   

 

Model::insert(array)


Model::insertGetId(array)

$ob

$ob->save

foreach($arr as $k=->$v)

 

删: Model:where()->delete()

改: Model:where()->update(array())

$ob = Xxx::where()->first()

$ob -> 字段名 = 值;

...

$ob ->save();

 

查: 

where();

select();

orderBy();

groupBy();

limit();

offset()

distinct()

first()

get()

join()

distinct()

 

laravel 数据模型方法

标签:groupby   sel   date   fse   distinct   数据   字段   upd   laravel   

原文地址:https://www.cnblogs.com/chenliuxiao/p/9262520.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!