Skip to content

Commit

Permalink
Update Builder.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jarektkaczyk authored Apr 14, 2020
1 parent f2d8aa0 commit 79f6828
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Sofa\Eloquence;

use Illuminate\Support\Str;
use Sofa\Eloquence\Searchable\Column;
use Illuminate\Database\Query\Expression;
use Sofa\Hookable\Builder as HookableBuilder;
Expand Down Expand Up @@ -393,7 +394,7 @@ protected function buildEqualsCase(Column $column, array $words)
*/
protected function isLeftMatching($word)
{
return ends_with($word, '*');
return Str::endsWith($word, '*');
}

/**
Expand All @@ -404,7 +405,7 @@ protected function isLeftMatching($word)
*/
protected function isWildcard($word)
{
return ends_with($word, '*') && starts_with($word, '*');
return Str::endsWith($word, '*') && Str::startsWith($word, '*');
}

/**
Expand Down

0 comments on commit 79f6828

Please sign in to comment.