| 123456789101112131415161718192021222324252627282930 |
- <?php
- namespace App\Models;
- use DateTimeInterface;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- /**
- * App\Models
- *
- * @mixin \Eloquent
- */
- class Member extends Model
- {
- use HasFactory;
- protected $guarded = ['id', 'updated_at', 'created_at'];
- /**
- * 为数组 / JSON 序列化准备日期。
- *
- * @param \DateTimeInterface $date
- * @return string
- */
- protected function serializeDate(DateTimeInterface $date)
- {
- return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
- }
- }
|