定制 catalyzecomm/laravel-filterable 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

catalyzecomm/laravel-filterable

Composer 安装命令:

composer require catalyzecomm/laravel-filterable

包简介

A Simple filter library for laravel

README 文档

README

StyleCI Latest Stable Version License Total Downloads

This package allows you to easily handle database filtering through query strings.

Installation

You can install the package via composer:

for Laravel 6.x & 7.x

composer require catalyzecomm/laravel-filterable

Introduction

Introduction here

Usage

Define your model (use Catalyzecomm\Filterable Trait and define $allowedFilters)

    use Catalyzecomm\Filterable;

    ...

    /**
     * Define an array of filter that allowed to use for this model
     * `key` as class name and `value` as field name(s)
     *
     * @var array
     */
    protected static $allowedFilters = [
        Catalyzecomm\Filters\Sort::class => 'created_at',
        Catalyzecomm\Filters\Keywords::class => 'name,email',
    ];

Use on your controller

    $users = User::filterPaginate();

or

    $users = User::filterAll();

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固