thinkphp5 获取软删除的数据


https://www.kancloud.cn/buerdsfang/fangsongmao/832665

 

// 默认情况下查询会过滤软删除数据 // 如果想要获得所有的数据(包括软删除数据) User::withTrashed()->find(); User::withTrashed()->select(); // 只查出软删除数据 User::onlyTrashed()->find(); User::onlyTrashed()->select();


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM