'datetime', 'total_gross' => 'decimal:0', 'total_deductions' => 'decimal:0', 'total_net' => 'decimal:0', ]; public function tenant() { return $this->belongsTo(Tenant::class); } public function confirmedBy() { return $this->belongsTo(User::class, 'confirmed_by'); } public function createdBy() { return $this->belongsTo(User::class, 'created_by'); } public function getPeriodNameAttribute() { $persianMonths = [ 1 => 'فروردین', 2 => 'اردیبهشت', 3 => 'خرداد', 4 => 'تیر', 5 => 'مرداد', 6 => 'شهریور', 7 => 'مهر', 8 => 'آبان', 9 => 'آذر', 10 => 'دی', 11 => 'بهمن', 12 => 'اسفند' ]; return ($persianMonths[$this->month] ?? $this->month) . ' ' . $this->year; } }