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

This package is abandoned and no longer maintained. No replacement package was suggested.

Add Eloquent Has By Non-dependent Subquery support to Laravel IDE Helper

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

A Laravel Package for adding Eloquent Has By Non-Dependent Subquery support to Laravel IDE Helper Laravel IDE Helper.

Installation

You can install the package via composer:

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

The package is loaded using Package Discovery, when disabled read Manual Installation.

Usage

Run standard model generation commands as normal:

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

Docblocks will be added to the model

/**
 * 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)
 */ 

Manual Installation

When disabled, register the LaravelIdeHelperHookEloquentHasByNonDependentSubqueryServiceProvider manually by adding it to your config/app.php

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

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.