<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Apply extends Model
{
  protected $table = 'apply';
  protected $fillable = ['user_id','share_name','share_phone','state','updated_at','created_at','user_id','not_desc'];
      public function getCreatedAtAttribute($value)
    {
        $dateTime = new \DateTime($value);

        // 格式化时间
        $formattedTime = $dateTime->format('Y-m-d H:i:s');

        return $formattedTime;
    }

    public function getUpdatedAtAttribute($value)
    {
        $dateTime = new \DateTime($value);

        // 格式化时间
        $formattedTime = $dateTime->format('Y-m-d H:i:s');

        return $formattedTime;
    }
}
