Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

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

Repository files navigation

Laravel IDE Helper Hook "Eloquent Has By Non-Dependent Subquery"

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages