Skip to content

Commit 767de36

Browse files
committed
Allows to change the builder implementation using the container
1 parent 6d59c01 commit 767de36

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes
22

3+
## [v6.2.0 (unreleased)](https://github.com/laravel/scout/compare/v6.1.0...v6.2.0)
4+
### Added
5+
- Builder implementation can be changed using the container ([#322](https://github.com/laravel/scout/pull/322))
6+
37
## [v6.1.0](https://github.com/laravel/scout/compare/v6.0.0...v6.1.0)
48

59
### Fixed

src/Searchable.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,12 @@ public function shouldBeSearchable()
103103
*/
104104
public static function search($query = '', $callback = null)
105105
{
106-
return new Builder(
107-
new static, $query, $callback, static::usesSoftDelete() && config('scout.soft_delete', false)
108-
);
106+
return app(Builder::class, [
107+
'model' => new static,
108+
'query' => $query,
109+
'callback' => $callback,
110+
'softDelete'=> static::usesSoftDelete() && config('scout.soft_delete', false)
111+
]);
109112
}
110113

111114
/**

0 commit comments

Comments
 (0)