laravel 增删修改
2024-08-31 23:39:15
1.查 public function userTest(){
return $this->all();
}
public function userTest(){
return $this->get(参数);
}
2.增 public function usrAdd(){
$this->user_name ='zhanfa';
$this->password ='21';
$this->save();
}
public function usrAdd(){
$user_data = ['username' =>'user2', 'age' => '21'];
$this->fill($user_data);
$this->save();
}
3.更改
public function userUpdata(){
$user_data =$this->where('user_id','2');
$user_data->update('user_name' =>"zjang".'age'=>'21'); }
4.删
public function userdete(){
$user = $this->find(参数);
$user->delete(); }
最新文章
- ABP框架 - 会话
- 常用快捷键: From Eclipse to Android Studio
- can't open a connection to site 'syb_backup'
- c# 配置文件之configSections配置(三)
- 如何定义DATATABLE,同时赋值
- html+css学习笔记 3[浮动]
- bzoj2618[Cqoi2006]凸多边形 半平面交
- UESTC_男神的约会 2015 UESTC Training for Dynamic Programming<;Problem J>;
- unigui数据库连接池
- R语言-ggplot初级
- C# Hex编码和解码
- Neutron路由篇:L3 agent+Namespace
- 前后端不分离的springboot项目问题:页面框架问题
- react axios 配置
- bind的封装
- Codeforces.744B.Hongcow&#39;s Game(交互 按位统计)
- GBDT(Gradient Boost Decision Tree)
- IOS 获取设备屏幕的尺寸
- 日期格式私人定制——SimpleDateFormat
- 如何向map和reduce脚本传递参数,加载文件和目录
热门文章
- Mac OSX 下配置 LNMP开发环境
- [Grid Layout] Describe a grid layout using named grid lines
- 前端工具WebStorm好在哪里?(带详细破解教程)
- D3.js以及通用JS(JavaScript)读取并解析server端JSON的注意事项
- Thermally driven workload scheduling in a heterogeneous multi-processor system on a chip
- Procedural graphics architectures and techniques
- Adaptive partitioning scheduler for multiprocessing system
- Windows应用程序的消息处理机制
- Ultra-wideband (UWB) secure wireless device pairing and associated systems
- Maven打包不打test,Maven中-DskipTests和-Dmaven.test.skip=true的区别