wimski/laravel-ide-helper-hook-eloquent-has-by-non-dependent-subquery

此包已被放弃,不再维护。未建议替代包。

为Laravel IDE Helper添加Eloquent Has By Non-dependent Subquery支持

2.1.0 2022-02-23 14:17 UTC

This package is auto-updated.

Last update: 2023-12-23 18:34:21 UTC


README

Software License GitHub Tests Action Status Coverage Status PHPStan

一个用于为Laravel IDE Helper添加Eloquent Has By Non-Dependent Subquery支持的Laravel包 Laravel IDE Helper

安装

您可以通过composer安装此包

composer require --dev wimski/laravel-ide-helper-hook-eloquent-has-by-non-dependent-subquery

当禁用时,使用Package Discovery加载包,当禁用时,请参阅手动安装

使用方法

运行标准的模型生成命令

php artisan ide-helper:models "App\Models\Post"

将添加文档注释到模型中

/**
 * App\Models\Post
 * 
 * @method static \Illuminate\Database\Eloquent\Builder|Post doesntHaveByNonDependentSubquery($relationMethod, ...$constraints) 
 * @method static \Illuminate\Database\Eloquent\Builder|Post hasByNonDependentSubquery($relationMethod, ...$constraints) 
 * @method static \Illuminate\Database\Eloquent\Builder|Post orDoesntHaveByNonDependentSubquery($relationMethod, ...$constraints) 
 * @method static \Illuminate\Database\Eloquent\Builder|Post orHasByNonDependentSubquery($relationMethod, ...$constraints)
 */ 

手动安装

当禁用时,手动注册LaravelIdeHelperHookEloquentHasByNonDependentSubqueryServiceProvider,将其添加到您的config/app.php

/*
 * Package Service Providers...
 */
 Wimski\LaravelIdeHelperHookEloquentHasByNonDependentSubquery\Providers\LaravelIdeHelperHookEloquentHasByNonDependentSubqueryServiceProvider::class,

测试

composer test

致谢

许可证

MIT许可证(MIT)。请参阅许可证文件获取更多信息。