Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Added support for Scout 6 and Lumen
Browse files Browse the repository at this point in the history
This adds support for Scout 6.x and removes the hard dependency on laravel/framework so that it can also be used with laravel/lumen-framework. Using laravel is implied anyway by using laravel/scout.
  • Loading branch information
boboldehampsink authored and msonowal committed Dec 11, 2018
1 parent b039768 commit 26de689
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
],
"minimum-stability": "dev",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*",
"laravel/scout": "^5.0"
"php": ">=7.0",
"laravel/scout": "^6.0"
},
"autoload": {
"psr-4": {
Expand Down
11 changes: 11 additions & 0 deletions src/Engines/MySQLEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ public function getTotalCount($results)
return $results['count'];
}

/**
* Flush all of the model's records from the engine.
*
* @param \Illuminate\Database\Eloquent\Model $model
*
* @return void
*/
public function flush($model)
{
}

protected function shouldNotRun($builder)
{
return strlen($builder->query) < config('scout.mysql.min_search_length');
Expand Down

0 comments on commit 26de689

Please sign in to comment.