andersao / andersao/l5-repository
Add getSql() method to dump sql and bindings after all criteria are attached.
Đang mở
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
Đánh giá
Issue này chưa được đánh giá.