protoqol/quasi

1.0.2 2023-06-24 15:40 UTC

This package is auto-updated.

Last update: 2024-08-24 18:14:11 UTC


README

Quasi

Quasi

Latest Version on Packagist

是否曾觉得为大型表格定义API资源有点麻烦?这个包通过预设资源中的所有列来简化生活,您只需简单地删除不需要的列,而不是添加需要的列。

想要帮助保持开源的可持续性吗?

您可以通过贡献代码或使用下面的按钮捐赠来帮助!这两种方式都备受赞赏,并直接有助于保持开源免费和可持续。

Donate

安装

您可以通过composer安装此包

composer require protoqol/quasi

可选 - 使用以下命令发布配置文件

php artisan vendor:publish --tag=quasi-config

用法

//  Table name is "guessed" based of the resource name and will result in 'users' in this case.
php artisan make:qresource UserResource 

// Table name is given as the second argument.
php artisan make:qresource UserResource users

配置

// The keys defined in this config will always be excluded from resources - if they exist as a key in the table.
'exclude' => [
    // 'id',
],

变更日志

有关最近更改的更多信息,请参阅变更日志

致谢

许可证

GNU GPL (GPL)。有关更多信息,请参阅许可证文件