Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Repository Laravel Package

littlebug/laravel-repository

View on GitHub
Deep Wiki
Context7
v2.0.7
  • feat: core:model 命令添加 --casts 参数、设置是否需要类型转换
  • refactor: update and delete 修改注释、返回类型应该为 integer 类型
v2.0.6
  • feat: or and and 查询支持数组嵌套

SQL:

select 
    `users`.* 
from 
    `users` 
where 
    `users`.`status` = 1 and 
    (
        (`users`.`status` = 1 and `users`.`age` = 2) 
        or 
        (`users`.`status` = 2 and `users`.`age` = 5) 
    );

PHP:

\Littlebug\Repository\Repository::instance()->find([
    'status' => 1,
    'or'     => [
        ['status' => 1, 'age' => 2],
        ['status' => 2, 'age' => 5],
    ],
]);
  • feat: core:model 添加 --fix 属性,更新数据库字段信息
v2.0.5
  • feat: 支持json字段 config->merchant 的查询方式
\Littlebug\Repository\Repository::instance()->find([
    'status'           => 1,
    'config->merchant' => true,
]);
v2.0.4

在写接口的时候,返回数据需要过滤掉敏感信息;所以在查询字段中添加 except 用来过滤指定字段 其实就是将 select * 修改为 select table.field1, table.field2 的形式

  • feat: 查询字段添加 except 用来指定需要排除查询的字段
 \Littlebug\Repository\Repository::instance()->find([
    'status' => 1
], ['except' => ['age', 'status', 'created_at', 'updated_at']]);
v2.0.3
  • fix: 修复命令行生成工具中目录判断函数使用错误bug
v1.0.19
  • feat: joinWith 使用了别名,优先使用别名
v2.0.2
  • feat: joinWith 使用了别名,优先使用别名
v1.0.18
  • feat: 添加功能
    • 添加 andor 的查询方式
    • 添加 instance 静态方法调用,可以不依赖注入使用repository
    \Littlebug\Repository\Repository::instance()->find(['status' => 1]);
    
  • factor: 代码重构
    • firstField 方法重命名为 getFieldArray
    • 删除类方法 handleExtraQuery 中拦截的 offsetlimit 字段
    • 删除类方法 conditionQueryscope 自定义方法的处理
  • delete: 删除方法
    • 删除 findWhere 方法; 上述 andor 完全可以代替
    • 删除 firstKey 方法, findByfindAllBy 字段参数不兼容数组,必须传递字符串
  • test: 添加测试用例
v2.0.1
  • feat: 添加 andor 预定义字段查询,支持嵌套
  • refactor:
    • posts.name 查询改为添加join查询条件 而不是关联查询条件
    • rel.posts.name 给关联查询添加附加添加
  • delete: 删除 findWhere 方法; 上述 andor 完全可以代替
v2.0.0
  • feat: 添加 throw 方法,抛出错误
  • refactor: 部分代码重构
    1. create 方法返回 $model->toArray() 结果
    2. update 方法返回修改受影响行数
    3. delete 方法返回返回删除行数
    4. paginate 方法返回 \Illuminate\Pagination\Paginator 对象
    5. firstField 方法重命名为 getFieldArray
  • delete: 删除部分方法
    1. success 方法
    2. error 方法
    3. getRelationDefaultFilters 方法
    4. getError 方法
    5. firstKey 方法
  • refactor: 命名空间修改为 Littlebug\Repository
v1.0.16
  • refactor: 部分代码重构

    • 删除 $paginateStyle 属性
    • 删除 setPaginateStyle 方法
  • feat: 添加方法

    • 添加 simplePaginate($condition = [], $columns = [], $size = 10, $current = null) 方法
    • 添加 filterSimplePaginate($condition = [], $columns = [], $size = 10, $current = null) 方法
    • 添加 filterFindBy($conditions, $column) 方法
    • 添加 filterFindAllBy($conditions, $column) 方法
  • fix: 修复关联表查询 ['__goods.id' => 1] 条件添加不上问题

v1.0.15
  • refactor: 将命令行注释说明改为英文
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager