boadusamuel/search-nested-json-column 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

boadusamuel/search-nested-json-column

Composer 安装命令:

composer require boadusamuel/search-nested-json-column

包简介

Search Nested json column inside database with no case sensitivity

README 文档

README

This package enables you make search inside nested json column in a database without case sensitivity inside laravel projects.

Installation

You can install the package via composer:

composer require boadusamuel/search-nested-json-column

Usage

After installing the package, you can use the trait in your model like so:

use Boadusamuel\SearchNestedJsonColumn\SearchNestedJsonColumn; 

class Product extends Model { use SearchNestedJsonColumn; } 

Then you can use the search method like so:

Product::query()->when($search, function (Builder $query) use ($search) {
    $this->searchJsonColumn($query, 'attribute_data->name->value->en', $search);
})->get();

Where attribute_data is the json column and name->value->en is the nested column you want to search. Also $search is the value you want to search for and $this referring to the model with the SearchNestedJsonColumn trait.

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固