hasOne('App\Models\User', 'id', 'user_id'); } public function getExpireTimeAttribute() { try { return date('Y-m-d H:i:s', $this->expire_date); } catch (Exception $e) { return null; } } }