feat: remove table model by passing null to with()

This commit is contained in:
Victor Westerlund 2023-11-02 11:44:20 +01:00
parent 13720e772e
commit bb3e91df36

View file

@ -48,7 +48,13 @@
} }
// Restrict query to array of column names // Restrict query to array of column names
public function with(array $model): self { public function with(?array $model = null): self {
// Remove table model if empty
if (!$model) {
$this->model = null;
return $this;
}
// Reset table model // Reset table model
$this->model = []; $this->model = [];