abduns/laravel-vcard 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

abduns/laravel-vcard

Composer 安装命令:

composer require abduns/laravel-vcard

包简介

Laravel bridge for the abduns/vcard generator.

README 文档

README

Laravel bridge for the abduns/vcard generator.

Tests Version Downloads License

Features

  • Modern PHP support
  • Lightweight and fast
  • Typed API
  • Laravel Facade
  • Response macros for .vcf downloads
  • Standards-oriented

Installation

composer require abduns/laravel-vcard

Quick Start

use Dunn\VCard\Laravel\Facades\VCard;

return response()->vcard(
    VCard::make()
        ->addName('Doe', 'John')
        ->addEmail('john@example.com', 'work')
        ->addPhoneNumber('+62-812-3456-7890', 'cell'),
    'john_doe.vcf'
);

Why This Package?

  • Existing solutions are outdated
  • Missing modern PHP features
  • Poor developer experience
  • No standards compliance
  • Too framework-coupled

This package focuses on simplicity, interoperability, and modern developer ergonomics for generating .vcf files natively in your Laravel application.

Usage

Basic Usage

use Dunn\VCard\Laravel\Facades\VCard;

$vcf = VCard::make()
    ->addName('Doe', 'John')
    ->addEmail('john@example.com', 'work')
    ->addPhoneNumber('+62-812-3456-7890', 'cell')
    ->addUrl('https://johndoe.com')
    ->build();

Advanced Usage

public function download(User $user)
{
    $vcard = VCard::make()
        ->addName($user->last_name, $user->first_name)
        ->addEmail($user->email)
        ->addPhoneNumber($user->phone, 'cell')
        ->addUid('urn:uuid:' . $user->uuid);

    return response()->vcard($vcard, "{$user->slug}.vcf");
}

Standards / Specifications

  • RFC 6350
  • RFC 6474
  • RFC 6715
  • RFC 8605
  • RFC 9554
  • RFC 9555

References:

Supported Features

Feature Support
Facade
Response Macros

Compatibility

Platform Supported
PHP 8.2+
Laravel 12.0+

Design Goals

  • Developer experience first
  • Predictable APIs
  • Minimal dependencies
  • Strong typing
  • Native Laravel integration

Architecture

  • facades
  • service providers
  • macroable responses

Performance

Operation Time
Generate vCard < 1ms

Testing

composer test

Roadmap

  • Artisan command for generating test vCards
  • CardDAV response helpers
  • Livewire component for vCard preview

Contributing

Contributions, issues, and discussions are welcome.

Security

If you discover security issues, please report them responsibly.

License

MIT

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固