andersao / andersao/l5-repository

Add getSql() method to dump sql and bindings after all criteria are attached.

Đang mở
#431 2 bình luận 5 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
PHP
Star
4.2k
Fork
880
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello. Would be great to add method to BaseRepository, so that you can dump sql instead of getting results. Example:

```
public function getSql()
{
$this->applyCriteria();
$this->applyScope();

return [
'sql' => $this->model->toSql(),
'bindings' => $this->model->getBindings(),
];
}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.