-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
390 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MongoDB\Laravel\Tests\Models; | ||
|
||
use Laravel\Scout\Searchable; | ||
use MongoDB\Laravel\Eloquent\Model as Eloquent; | ||
use MongoDB\Laravel\Eloquent\SoftDeletes; | ||
|
||
class SearchableModel extends Eloquent | ||
{ | ||
use Searchable; | ||
use SoftDeletes; | ||
|
||
protected $connection = 'sqlite'; | ||
protected $table = 'searchable'; | ||
protected static $unguarded = true; | ||
|
||
public function searchableAs(): string | ||
{ | ||
return 'table_searchable'; | ||
} | ||
|
||
public function indexableAs(): string | ||
{ | ||
return 'table_indexable'; | ||
} | ||
|
||
public function getScoutKey(): string | ||
{ | ||
return 'key_' . $this->id; | ||
} | ||
} |
Oops, something went wrong.