|null $poll_options * @property array|null $cached_tallies * @property int $multiple * @property int $hide_totals * @property int $votes_count * @property string|null $last_fetched_at * @property Carbon|null $expires_at * @property Carbon|null $created_at * @property Carbon|null $updated_at * @property-read Collection $votes * * @method static \Illuminate\Database\Eloquent\Builder|Poll newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Poll newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Poll query() * @method static \Illuminate\Database\Eloquent\Builder|Poll whereCachedTallies($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereExpiresAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereGroupId($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereHideTotals($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereLastFetchedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereMultiple($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll wherePollOptions($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereProfileId($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereStatusId($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereStoryId($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Poll whereVotesCount($value) * * @mixin \Eloquent */ class Poll extends Model { use HasFactory, HasSnowflakePrimary; /** * Indicates if the IDs are auto-incrementing. * * @var bool */ public $incrementing = false; protected function casts(): array { return [ 'poll_options' => 'array', 'cached_tallies' => 'array', 'expires_at' => 'datetime', ]; } public function votes() { return $this->hasMany(PollVote::class); } public function getTallies() { return $this->cached_tallies; } }