以下操作在Dao层操作
public function propertyLists($ids, $columns)
{
$this->getconnection()->enableQueryLog(); //开启日志
if(!empty($ids))
{
$data = $this->whereRaw('id=367 OR id=176')->get($columns);
print_r($this->getconnection()->getQueryLog());exit; //打印sql
return $data = !empty($data) ? $data->toArray() : [];
}
}laravel打印sql
最新推荐文章于 2025-11-05 16:56:04 发布

6670

被折叠的 条评论
为什么被折叠?



