<?php

namespace Sargilla\Flatlab4\Traits;

use Carbon\Carbon;

trait DateTranslator
{
    public function getCreatedAtAttribute($created_at)
    {
        return $created_at ? Carbon::parse($created_at)->locale('es') : null;
    }
    public function getUpdatedAtAttribute($updated_at)
    {
        return $updated_at ? Carbon::parse($updated_at)->locale('es') : null;
    }
    public function getDeletedAtAttribute($deleted_at)
    {
        return $deleted_at ? Carbon::parse($deleted_at)->locale('es') : null;
    }
}
