osamaalmamri/laravel-search
最新稳定版本:1.0
Composer 安装命令:
composer require osamaalmamri/laravel-search
包简介
This is my package laravel-search
README 文档
README
this package is facility the search in model with complex relations
Installation
You can install the package via composer:
composer require osamaalmamri/laravel-search
You can publish the config file with:
php artisan vendor:publish --tag="laravel-search-config"
This is the contents of the published config file:
return [ // this is the key namein Request $request 'key' => "search" ];
Usage
in the modal we use searchable class
use OsamaAlmamri\LaravelSearch\Searchable; class YourModal extends Model { use Searchable; // define the name of cols //if you need search in another fields of another table using the relation name then col name // you can search any related relation as the following public $searchable = ['name','description','user.name','user.phone','user.role.name']; }
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-07