Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Vcard

Laravel Vcard Laravel Package

astrotomic/laravel-vcard

Generate and download vCard (.vcf) files in Laravel with a fluent, expressive builder. Map Eloquent models or plain data to vCard 3.0/4.0 contact cards, customize fields, and serve them as downloadable files or responses—ideal for adding "Save contact" features to any app.

View on GitHub
Deep Wiki
Context7

A fluent builder class for vCard files.

Frequently asked questions about Laravel Vcard
How do I install astrotomic/laravel-vcard in a Laravel application?
Install it with Composer using composer require astrotomic/laravel-vcard. Laravel package auto-discovery should register the service provider and facade, and you may be able to publish a config file if the package provides one. Check the resolved Composer constraints before installing, because this package is still pre-1.0.
Does astrotomic/laravel-vcard support Laravel 11 and PHP 8.3?
The package is built as a Laravel wrapper, but its exact Laravel and PHP version bounds are defined in its composer.json and should be verified before you install it. Do not assume support for the newest Laravel or PHP release until those constraints and the test matrix confirm it. This is especially important for a pre-1.0 package where the support policy may change between minor versions.
How do I generate a vCard from an Eloquent model with laravel-vcard?
Use the fluent builder to map model attributes such as name, phone, email, organization, and address to vCard fields. The package is designed to accept plain data as well as Eloquent-backed values, so you can keep the mapping in a dedicated exporter or service class. Render the card to a string and then return it as a download response.
Can I download a .vcf file from a Laravel controller using this package?
Yes. The package produces vCard text, which you can return through Laravel's response or download helpers with the appropriate .vcf filename and content type. Keep the generation step inside a controller or dedicated export service, and add tests that assert the response headers and body.
Which vCard versions does astrotomic/laravel-vcard support, 3.0 or 4.0?
The package is described as supporting vCard 3.0 and 4.0 contact cards, but you should confirm which version is actually emitted and whether the caller can select it. This matters because vCard 3.0 and 4.0 have different rules, and many enterprise consumers still expect 3.0. Test against the contact apps your users actually rely on.
Is astrotomic/laravel-vcard safe for user-supplied contact data?
vCard output is a text format with special characters, line folding, and property delimiters, so escaping and sanitisation must be handled explicitly. Confirm whether the package escapes values such as newlines, commas, semicolons, and backslashes, or whether your application must do it before passing data to the builder. Add tests with hostile and non-ASCII input before exposing a Save contact endpoint.
How should I test vCard output from laravel-vcard in Laravel?
Use golden-file tests that compare generated output for a representative set of contacts, rather than only asserting that a string is returned. Cover CRLF line endings, 75-octet line folding, escaping, multi-valued fields, and non-ASCII names. Also import the generated .vcf into iOS Contacts, Google Contacts, and Outlook to catch consumer-specific parsing issues.
Is astrotomic/laravel-vcard maintained and production-ready?
It is a narrow, single-purpose package, but it is still pre-1.0 and maintained by a small vendor, so bus factor and abandonment risk are the main long-term concerns. The 0.8.1 release is a patch, but the published note contains only a compare link and no changelog detail. Pin the version, review each upgrade diff, and keep adapter code thin so you can swap it later.
What are alternatives to astrotomic/laravel-vcard for generating vCards in PHP?
Alternatives include standalone PHP vCard libraries, a small custom formatter for your exact output requirements, or an external CRM or contact export service. Laravel's response and mail APIs make it straightforward to serve a .vcf from any implementation. Compare escaping, vCard version support, and maintenance activity before choosing.
How do I handle photos, avatars, and non-ASCII names in laravel-vcard?
vCard photos can be embedded or referenced, and the correct approach depends on the vCard version and the consumer app; non-ASCII names need consistent UTF-8 handling and proper escaping. Confirm how the package handles PHOTO properties, CHARSET or encoding parameters, and line folding for long values. Test with real contact apps, because a card that renders as text may still fail to import correctly.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console