laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
169 stars 7 forks source link

[Bug]: Model with ULID #1080

Open tdrabikdev opened 1 week ago

tdrabikdev commented 1 week ago

Bug description


declare(strict_types=1);

namespace App\Models;

use Illuminate\Database\Eloquent\Concerns\HasUlids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class EstimateItem extends Model
{
    use HasFactory;
    use HasUlids;
    use HasUlids;
    use HasUlids;

    protected $fillable = [
        'estimate_id',
        'company_id',
        'name',
        'quantity',
        'price',
        'total',
    ];

    public function estimate(): BelongsTo
    {
        return $this->belongsTo(Estimate::class);
    }

    public function company(): BelongsTo
    {
        return $this->belongsTo(Company::class);
    }
}

When you create new model and add some relationsips, then for each relationship is added use HasUlids; plus to modelitself.

Plugin version

8.3.3.242

Operating system

Windows

Steps to reproduce

Create new morel with some relalationships with ulid as forreign key.

Relevant log output

No response

adelf commented 1 week ago

Sorry. Fixed. I hope to release the update with this fix soon.