Mixed::search()
last analyzed

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 3
c 2
b 1
f 0
nc 1
nop 2
dl 0
loc 6
1
<?php
2
3
namespace Matchish\ScoutElasticSearch;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Laravel\Scout\Builder;
7
use Laravel\Scout\Searchable;
8
9
final class Mixed
10
{
11
    /**
12
     * Perform a search against the model's indexed data.
13
     *
14
     * @param  string  $query
15
     * @param  \Closure  $callback
16
     * @return \Laravel\Scout\Builder
17
     */
18
    public static function search($query = '', $callback = null)
19
    {
20
        return new Builder(new class extends Model
21
        {
22
            use Searchable;
0 ignored issues
show
Bug introduced by
The trait Laravel\Scout\Searchable requires the property $queryCallback which is not provided by anonymous//src/Mixed.php$0.
Loading history...
23
        }, $query, $callback);
24
    }
25
}
26