點選檢視程式碼
$meal=Db::name('meal_cookbook')->where('cookbook_name', 'like', '%'.$param['cookbook_name'].'%')->where(function ($query) {
$map1[] = ['uid', '=', 0];
$map2[] = ['uid', '=', $this->user_id];
$query->whereOr([$map1, $map2]);
})->select()->toArray();