forked from larastan/larastan
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
- Larastan Version: 3.1.6
- Laravel Version: 11.42.1
Description
Anonymous function should return Illuminate\Database\Eloquent\Builder<Illuminate\Database\Eloquent\Model> but returns Domain\Warehouse\QueryBuilders\WarehouseQueryBuilder<Domain\Warehouse\Models\Warehouse>.
Laravel code where the issue was found
Product::withTrashed()->whereHas('stocks.warehouse', fn ($q) => $q->where('id', $inventory->warehouse_id))Product.php
/**
* @return HasMany<Stock, $this>
*/
public function stocks(): HasMany
{
return $this->hasMany(Stock::class);
}Stock.php
/**
* @return BelongsTo<Warehouse, $this>
*/
public function warehouse(): BelongsTo
{
return $this->belongsTo(Warehouse::class);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working