'datetime', ]; protected static function booted(): void { static::creating(function (Vote $vote) { $vote->created_by ??= auth()->id(); }); } public function creator(): BelongsTo { return $this->belongsTo(User::class, 'created_by'); } public function items(): HasMany { return $this->hasMany(VoteItem::class); } }