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

Commit

Permalink
added laravel ^6.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
freezer278 authored and msonowal committed Sep 6, 2019
1 parent 221c380 commit b64f3bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea/
composer.lock
/vendor
5 changes: 3 additions & 2 deletions src/Providers/MySQLScoutServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Yab\MySQLScout\Providers;

use Illuminate\Support\Str;
use Yab\MySQLScout\Engines\Modes\ModeContainer;
use Illuminate\Support\ServiceProvider;
use Laravel\Scout\EngineManager;
Expand Down Expand Up @@ -43,8 +44,8 @@ public function register()

$this->app->singleton(ModeContainer::class, function ($app) {
$engineNamespace = 'Yab\\MySQLScout\\Engines\\Modes\\';
$mode = $engineNamespace.studly_case(strtolower(config('scout.mysql.mode')));
$fallbackMode = $engineNamespace.studly_case(strtolower(config('scout.mysql.min_fulltext_search_fallback')));
$mode = $engineNamespace.Str::studly(strtolower(config('scout.mysql.mode')));
$fallbackMode = $engineNamespace.Str::studly(strtolower(config('scout.mysql.min_fulltext_search_fallback')));

return new ModeContainer(new $mode(), new $fallbackMode());
});
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function getClassNameFromFile($filePathName)
$classes[] = $class_name;
}
}
if (!isset($classes[0]) {
if (!isset($classes[0])) {
return 'no_class_found_in_file';
}
return $classes[0];
Expand Down

0 comments on commit b64f3bc

Please sign in to comment.