123456789101112131415161718192021 |
- <?php
- namespace App\Models\Wetalk;
- use Illuminate\Database\Eloquent\Model;
- use DateTimeInterface;
- class Read extends Model
- {
- protected $connection = 'mysql_t';
- protected $table='read';
- protected $guarded=[];
- protected function serializeDate(DateTimeInterface $date): string
- {
- return $date->format('Y-m-d H:i:s');
- }
- public function article(): \Illuminate\Database\Eloquent\Relations\HasOne
- {
- return $this->hasOne(Article::class,'id','article_id');
- }
- }
|