<?php

namespace App\Support;

trait HasDeadlineTrait {
    public function getDaysTillDeadlineAttribute(): int {
        return now()->diffInDays($this->deadline, false);
    }

    public function getDaysTillDeadlineLabelAttribute(): string {
        return $this->daysTillDeadline . ' ' . trans_choice('день|дня|дней', $this->daysTillDeadline);
    }


}
