-
Notifications
You must be signed in to change notification settings - Fork 343
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
fbc710f
commit 9f06b9c
Showing
5 changed files
with
34 additions
and
11 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
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 |
---|---|---|
|
@@ -52,11 +52,12 @@ abstract public function mapIds($results); | |
/** | ||
* Map the given results to instances of the given model. | ||
* | ||
* @param \Laravel\Scout\Builder $builder | ||
* @param mixed $results | ||
* @param \Illuminate\Database\Eloquent\Model $model | ||
* @return \Illuminate\Database\Eloquent\Collection | ||
*/ | ||
abstract public function map($results, $model); | ||
abstract public function map(Builder $builder, $results, $model); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jhm-ciberman
|
||
|
||
/** | ||
* Get the total count from a raw result returned by the engine. | ||
|
@@ -86,7 +87,7 @@ public function keys(Builder $builder) | |
public function get(Builder $builder) | ||
{ | ||
return Collection::make($this->map( | ||
$this->search($builder), $builder->model | ||
$builder, $this->search($builder), $builder->model | ||
)); | ||
} | ||
} |
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
Hey! I think this is a BREAKING change. This broke https://github.com/teamtnt/laravel-scout-tntsearch-driver in fact.
(issue: teamtnt/laravel-scout-tntsearch-driver#175)
Also, this should be documented on https://laravel.com/docs/master/scout