shepp/nova-concat-search 问题修复 & 功能扩展

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

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

shepp/nova-concat-search

最新稳定版本:v1.0.0

Composer 安装命令:

composer require shepp/nova-concat-search

包简介

Search by Concatenated fields in Laravel Nova

README 文档

README

Allows searching for Resources by a concatenation of multiple fields in Laravel Nova.

Example

An example use case is where a table contains first_name and last_name, and the Nova user would like to search by full name.

Example table;

first_name last_name email ...
John Doe john@doe.com ...

Using standard Nova search, the term John Doe will not match this record as neither first name or last name match.

By adding a sub-array of column names into the $search property of a Resource, this package allows searching on concatenated database fields:

class User extends Resource
{
    use Shepp\NovaConcatSearch\Traits\SearchesOnConcatColumns;

    public static $search = [
        ['first_name', 'last_name'], // <----
        'email',
    ];

    // ...
}

This is effectively appending the following to the search query;

WHERE
    # ...
    OR CONACT(first_name, ' ', last_name) LIKE '%John Doe%'

Using the example above, this will allow the term John Doe to match the sample record.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2022-09-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固