Skip to content

Releases: lorisleiva/laravel-search-string

v1.3.0

11 Mar 10:12
3842079
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2.0...v1.3.0

v1.2.0

24 Feb 15:45
e7793c8
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.1.3...v1.2.0

v1.1.3

30 Apr 19:14
366f558
Compare
Choose a tag to compare

Make order by and select keyword rules use column aliases (See #34)

v1.1.2

21 Mar 21:49
82c0d74
Compare
Choose a tag to compare

Add case_insensitive option for search queries — defaults to false for backward compatibility. (See #22)

You can set it to true in your options amongst columns and keywords. For example, in the config/search-string.php file:

return [
    'default' => [
        'case_insensitive' => true, // <- Globally.
        // ...
    ],

    Article::class => [
        'case_insensitive' => true, // <- Only for the Article class.
        // ...
    ],
];

When set to true, it will lowercase both the column and the value before comparing them using the like operator.

$value = mb_strtolower($value, 'UTF8');
$query->whereRaw("LOWER($column) LIKE ?", ["%$value%"]);

v1.1.1

05 Feb 17:52
8b0b820
Compare
Choose a tag to compare
  • More robust way to check if a string is a regex (#31)
  • Do not qualify the column name when already prefixed (#33)

v1.1.0

29 Jan 10:10
afed28a
Compare
Choose a tag to compare

Use qualify column names to avoid ambiguous conflicts (See #32)

v1.0.4

17 Sep 15:23
Compare
Choose a tag to compare

🚑 Fix searchable columns inside relationships (#27)

v1.0.3

13 Sep 17:29
a3d28f7
Compare
Choose a tag to compare

⬆️ Add support for Laravel 8

v1.0.2

31 Aug 13:42
bdd20c7
Compare
Choose a tag to compare

Fix resolve conflict with HOA protocol

v1.0.1

04 Jul 11:32
Compare
Choose a tag to compare

🚑 Allow CompilerInterface to handle null input instead of throwing a TypeError (#20).