plugin
plugin copied to clipboard
[Bug]: Factory class not found
Bug description
I'm evaluating the plugin more when I try to create the phpdoc to help in the ide, it gives me an error

Factory class not found for \App\Models\Contribuinte Factory class not found for \App\Models\NaturezaJuridicaTipo Factory class not found for \App\Models\NaturezaJuridica Factory class not found for \App\Models\Modelo
Plugin version
5.1.1.213
Operating system
Windows
Steps to reproduce
No response
Relevant log output
No response
Hi. Seems these classes have the HasFactory trait. But there are no factory classes for them. You can ignore these warnings or remove traits.
is not generating autocomplete for fields

/**
* @property Modelo $modelo
* @method BelongsTo|_IH_Modelo_QB modelo()
* @property Model $prestador
* @method MorphTo prestador()
* @property _IH_NotaServico_C|NotaServico[] $servicos
* @property-read int $servicos_count
* @method HasMany|_IH_NotaServico_QB servicos()
* @property Model $tomador
* @method MorphTo tomador()
* @method static _IH_Nota_QB onWriteConnection()
* @method _IH_Nota_QB newQuery()
* @method static _IH_Nota_QB on(null|string $connection = null)
* @method static _IH_Nota_QB query()
* @method static _IH_Nota_QB with(array|string $relations)
* @method _IH_Nota_QB newModelQuery()
* @method static _IH_Nota_C|Nota[] all()
* @mixin _IH_Nota_QB
*/
class Nota extends Model {}
<?php
namespace App\Models;
use App\Models\Api\Servico;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\MorphTo;
class Nota extends Model
{
use HasFactory;
protected $fillable = ['id', 'ano', 'numero', 'rps_numero', 'rps_serie', 'rps_tipo'];
protected $hidden = ['prestador_type', 'prestador_id', 'tomador_type', 'tomador_id'];
public function prestador(): MorphTo
{
return $this->morphTo();
}
public function tomador(): MorphTo
{
return $this->morphTo();
}
public function servicos(): HasMany
{
return $this->hasMany(NotaServico::class);
}
public function modelo(): BelongsTo
{
return $this->belongsTo(Modelo::class, 'modelo_id', 'id');
}
}