plugin
plugin copied to clipboard
[Bug]: Model with ULID
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
Sorry. Fixed. I hope to release the update with this fix soon.