定制 neiderruiz/filter-eloquent-laravel 二次开发

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

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

neiderruiz/filter-eloquent-laravel

Composer 安装命令:

composer require neiderruiz/filter-eloquent-laravel

包简介

filter query eloquent laravel

README 文档

README

Github Github Linkedin Gmail

Translate text php

composer require neiderruiz/filter-eloquent-laravel

how using translator

// import pachage
use Neiderruiz\FilterEloquentLaravel\Traits\FilterQuery;

// use trait in controller
class UserController extends Controller
{
    use FilterQuery;
}

// example use filter
public function index(Request $request)
    {
        $this->filter = User::query();
        $this->addWith();
        $this->where();
        $this->search();
        return $this->success($this->paginate());
    }

// your url request
?paginate=true&search=[articles,name,laravel]&with=[articles:id,title]

// get specific fields
&inputs=id,name,email

get specific fields

// your url request
&fields=id,name,email

with relations

&with=[posts:id,title,user_id]

with multiple relations

//example one
&with=[posts:id,title,user_id]

// example two
&with=[posts:id,title,user_id][posts.comments]

// example three
&with=[posts:id,title,user_id][posts.comments][posts.comments.user]

// example four
&with=[posts:id,title,user_id][posts.comments][posts.comments:id,description]

Simple Search

// your url request
&search=[name,your text]

Search With Relation

// your url request
&search=[articles,name,your text]

Search With Multiple Relation

// your url request
&search=[articles,name,your text][articles,description,your text]

Where

// example one
&where=[id,10]

// example two
&where=[id,10][name,neider ruiz]

// example three
&where=[name,neider ruiz,like]

// example four
&where=[age,20,<=]

Where With Relation

// example one
&where=[articles,id,10]

// example two
&where=[articles,title,mi titulo,like]

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固