-
Notifications
You must be signed in to change notification settings - Fork 340
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
1 parent
0716725
commit 0ff8f08
Showing
8 changed files
with
599 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Laravel\Scout\Attributes; | ||
|
||
use Attribute; | ||
use Illuminate\Support\Arr; | ||
|
||
#[Attribute] | ||
class SearchUsingFullText | ||
{ | ||
/** | ||
* The full-text columns. | ||
* | ||
* @var array | ||
*/ | ||
public $columns = []; | ||
|
||
/** | ||
* Create a new attribute instance. | ||
* | ||
* @param array|string $columns | ||
* @return void | ||
*/ | ||
public function __construct($columns) | ||
{ | ||
$this->columns = Arr::wrap($columns); | ||
} | ||
} |
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,28 @@ | ||
<?php | ||
|
||
namespace Laravel\Scout\Attributes; | ||
|
||
use Attribute; | ||
use Illuminate\Support\Arr; | ||
|
||
#[Attribute] | ||
class SearchUsingPrefix | ||
{ | ||
/** | ||
* The prefix search columns. | ||
* | ||
* @var array | ||
*/ | ||
public $columns = []; | ||
|
||
/** | ||
* Create a new attribute instance. | ||
* | ||
* @param array|string $columns | ||
* @return void | ||
*/ | ||
public function __construct($columns) | ||
{ | ||
$this->columns = Arr::wrap($columns); | ||
} | ||
} |
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,28 @@ | ||
<?php | ||
|
||
namespace Laravel\Scout\Contracts; | ||
|
||
use Laravel\Scout\Builder; | ||
|
||
interface PaginatesEloquentModels | ||
{ | ||
/** | ||
* Paginate the given search on the engine. | ||
* | ||
* @param \Laravel\Scout\Builder $builder | ||
* @param int $perPage | ||
* @param int $page | ||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator | ||
*/ | ||
public function paginate(Builder $builder, $perPage, $page); | ||
|
||
/** | ||
* Paginate the given search on the engine using simple pagination. | ||
* | ||
* @param \Laravel\Scout\Builder $builder | ||
* @param int $perPage | ||
* @param int $page | ||
* @return \Illuminate\Contracts\Pagination\Paginator | ||
*/ | ||
public function simplePaginate(Builder $builder, $perPage, $page); | ||
} |
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
Oops, something went wrong.