Completed
Pull Request — develop (#12)
by
unknown
03:19 queued 45s
created

FulltextFilterDirective::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace DeInternetJongens\LighthouseUtils\Directives;
4
5
use Illuminate\Database\Eloquent\Builder;
6
7
class FulltextFilterDirective extends BaseDirective
8
{
9
    public function name(): string
10
    {
11
        return 'fulltext';
12
    }
13
14
    public function handle(string $fieldName, string $value, Builder $builder): Builder
15
    {
16
       return $builder->getModel()->fullTextSearch($builder, $value);
17
    }
18
}
19