![mysql](https://habrastorage.org/r/w120/webt/5b/53/d5/5b53d5517cb34636505650.png)
MySQL
- 1 ответ
- 0 вопросов
1
Вклад в тег
$q = Tags::where('name', 'LIKE', '%' . $like . '%')
->whereNotIn('id', $deprecate)
->where(function ($q) use ($id) {
$q->whereHas('closure', function ($q) use ($id) {
$q->where('tags_closure.ancestor_id', '=', $id);
})->orWhere(function ($q) {
$q->where('is_sealed', 1);
});
})
->with('closure');
$sql = $q->toSql();
var_dump($sql);