forked from laravel/scout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScout.php
52 lines (45 loc) · 1.08 KB
/
Scout.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace Laravel\Scout;
use Laravel\Scout\Jobs\MakeSearchable;
use Laravel\Scout\Jobs\RemoveFromSearch;
class Scout
{
/**
* The Scout library version.
*
* @var string
*/
const VERSION = '10.2.0';
/**
* The job class that should make models searchable.
*
* @var string
*/
public static $makeSearchableJob = MakeSearchable::class;
/**
* The job that should remove models from the search index.
*
* @var string
*/
public static $removeFromSearchJob = RemoveFromSearch::class;
/**
* Specify the job class that should make models searchable.
*
* @param string $class
* @return void
*/
public static function makeSearchableUsing(string $class)
{
static::$makeSearchableJob = $class;
}
/**
* Specify the job class that should remove models from the search index.
*
* @param string $class
* @return void
*/
public static function removeFromSearchUsing(string $class)
{
static::$removeFromSearchJob = $class;
}
}