technote/laravel-search-helper
Larablocks Analysis
technote/laravel-search-helper works with Laravel 4 to 9 (latest release v0.2.28, Jul 13, 2022), all past end of life (the last on Feb 6, 2024): no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 4 to 9, past end of life since Feb 6, 2024
- No release in the last 12 months (last: Jul 13, 2022)
- 28 downloads a month (needs 10,000)
- 2 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Jul 13, 2022.
- No releases in the last 12 months.
- First released: Aug 16, 2019.
- Monthly downloads: 28.
- 6 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 30, 2026.
| Install | |
|---|---|
composer require technote/laravel-search-helper |
|
| Latest Version: | v0.2.28 |
| PHP: | ^7.4|^8.0 |
| Laravel: | 4 – 9 |
| License: | MIT |
| Last Updated: | Jul 22, 2023 |
| Links: | GitHub · Packagist |
Laravel Search Helper
Read this in other languages: English, 日本語.
Search helper for Laravel.
Table of Contents
Install
composer require technote/laravel-search-helper
Usage
-
Implement
Searchable ContractandSearchable Trait. -
Implement
setConditionsmethod.<?php namespace App\Models; use Eloquent; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Technote\SearchHelper\Models\Contracts\Searchable as SearchableContract; use Technote\SearchHelper\Models\Traits\Searchable; /** * Class Item * @mixin Eloquent */ class Item extends Model implements SearchableContract { use Searchable; /** * @var array */ protected $guarded = [ 'id', ]; /** * @param Builder $query * @param array $conditions */ protected static function setConditions(Builder $query, array $conditions) { if (! empty($conditions['s'])) { collect($conditions['s'])->each(function ($search) use ($query) { $query->where(function ($builder) use ($search) { /** @var Builder $builder */ $builder->where('items.name', 'like', "%{$search}%"); }); }); } } } -
Call
searchmethod.<?php use App\Models\Item; Item::search([ 's' => [ 'test', ], 'ids' => [1, 2, 3], ])->get();
Author
Related Packages
A hashed search package for adding a searchable hash to your encrypted database...
Laravel Scout provides a driver based solution to searching your Eloquent models...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v0.2.28 | ^7.4| | * | MIT | |
| v0.2.27 | ^7.4| | * | MIT | |
| v0.2.26 | ^7.4| | * | MIT | |
| v0.2.25 | ^7.4| | * | MIT | |
| v0.2.24 | ^7.4| | * | MIT | |
| v0.2.23 | ^7.4| | * | MIT | |
| v0.2.22 | ^7.4| | * | MIT | |
| v0.2.21 | ^7.4| | * | MIT | |
| v0.2.20 | ^7.4| | * | MIT | |
| v0.2.19 | ^7.4| | * | MIT | |
| v0.2.18 | ^7.4| | * | MIT | |
| v0.2.17 | ^7.3| | * | MIT | |
| v0.2.16 | ^7.3| | * | MIT | |
| v0.2.15 | ^7.3| | * | MIT | |
| v0.2.14 | ^7.3 | * | MIT | |
| v0.2.13 | ^7.3 | * | MIT | |
| v0.2.12 | ^7.3 | * | MIT | |
| v0.2.11 | ^7.3 | * | MIT | |
| v0.2.10 | ^7.3 | * | MIT | |
| v0.2.9 | ^7.3 | * | MIT | |
| v0.2.8 | ^7.3 | * | MIT | |
| v0.2.7 | ^7.3 | * | MIT | |
| v0.2.6 | ^7.3 | * | MIT | |
| v0.2.5 | ^7.3 | * | MIT | |
| v0.2.4 | ^7.3 | * | MIT | |
| v0.2.3 | ^7.3 | * | MIT | |
| v0.2.2 | ^7.3 | * | MIT | |
| v0.2.1 | ^7.3 | * | MIT | |
| v0.2.0 | ^7.3 | * | MIT | |
| v0.1.4 | ^7.2 | * | MIT |
Showing the latest 30 of 39. See every release on Packagist