<?php


namespace App\Models\Traits;


trait HasDates{

    public function getCreatedDateAttribute(){
        $created_at = $this->created_at ;
        return ($created_at) ? $created_at->format(__("d-m-Y à H:i:s")) : $created_at;
    }

    public function getUpdatedDateAttribute(){
        $updated_at = $this->updated_at ;
        return ($updated_at) ? $updated_at->format(__("d-m-Y à H:i:s")) : $updated_at;
    }

    public function getDeletedDateAttribute(){
        $deleted_at = $this->deleted_at ;
        return ($deleted_at) ? $deleted_at->format(__("d-m-Y à H:i:s")) : $deleted_at;
    }
}
