Download the PHP package lookfeel/laravel-eloquent-append-automate without Composer

On this page you can find all versions of the php package lookfeel/laravel-eloquent-append-automate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-eloquent-append-automate

Laravel Eloquent Append Automation

撸了个包,解决困扰我很久的一个问题,当给定了 $appends 之后,在某些限定了查询字段的查询时,会因没查询 accessor 中涉及的字段而导致错误,而每次在使用的时候再去动态 append 又很烦,变化时维护起来很心累。

根据 appends 配置的关联字段映射关系,自动维护需要的 appends。

安装

Note: Laravel Eloquent Append Automation requires Laravel 5.6+.

使用

Appends 字段映射配置

如下所见,您仅仅需要给需要做字段映射的 append 添加对应的键名,键名为字映射字段名称,程序将自动根据映射关系,判断是否需要移除这些 append,以避免因查询中缺少该字段而引起的错误。

Model:
Controller

使用 Lookfeel\AppendAutomate\Database\Eloquent\Model 替换 Illuminate\Database\Eloquent\Model

只需将 Model 继承 Lookfeel\AppendAutomate\Database\Eloquent\Model 即可. Lookfeel\AppendAutomate\Database\Eloquent\Model 继承自 Eloquent

使用 Lookfeel\AppendAutomate\AppendAutomateTrait

如果由于某些原因不能继承 Lookfeel\AppendAutomation\Database\Model,那么您可以在已有 Model 中 use Lookfeel\AppendAutomation\AppendAutomateTrait

相关文章:

https://learnku.com/articles/31931

单元测试

License

Laravel Eloquent Append Automation is licensed under the MIT License.


All versions of laravel-eloquent-append-automate with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
illuminate/database Version >=6.0
illuminate/console Version >=6.0
illuminate/support Version >=6.0
illuminate/cache Version >=6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lookfeel/laravel-eloquent-append-automate contains the following files

Loading the files please wait ....