Skip to content

Commit caa6eb6

Browse files
committed
remove resetApply and use base builder
1 parent a48d0d1 commit caa6eb6

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ write filter on filter and get a query
2828
$userFilter->apply($validated);
2929
$userFilter->apply($validated_2)->query();
3030
```
31-
filter cleaning and reuse
32-
```php
33-
$userFilter->resetApply($validated_3)->query();
34-
```
3531

3632
In order to use a filter you have to create a new one by the command that is provided by the package:
3733

src/Services/FilterService.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct($client, Builder $builder)
2424
}
2525
$this->client = $client;
2626
$this->baseBuilder = $builder;
27-
$this->getClient()->builder = clone $this->baseBuilder;
27+
$this->getClient()->builder = $this->baseBuilder;
2828
}
2929

3030
protected function getBaseBuilder()
@@ -114,10 +114,4 @@ public function apply(array $params = [])
114114

115115
return $this;
116116
}
117-
118-
public function resetApply()
119-
{
120-
$this->getClient()->builder = clone $this->getBaseBuilder();
121-
return $this;
122-
}
123117
}

0 commit comments

Comments
 (0)