PHPackages                             elouafidev/vcf-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. elouafidev/vcf-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

elouafidev/vcf-generator
========================

A simple VCF generator for Laravel.

1.0.3(1y ago)0131MITPHPPHP &gt;=7.4

Since May 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/elouafidev/vcf-generator)[ Packagist](https://packagist.org/packages/elouafidev/vcf-generator)[ RSS](/packages/elouafidev-vcf-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

VCF Generator for Laravel
=========================

[](#vcf-generator-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9198052e5b610484aaabd550b5162d2363253bb95a7002facf22a503aeceadab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6f756166696465762f7663662d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/elouafidev/vcf-generator)[![Total Downloads](https://camo.githubusercontent.com/039702ffacbd1515af8774fc4c3b59065ab03cd5bc77256511a8aa1724961c6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656c6f756166696465762f7663662d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/elouafidev/vcf-generator)[![License](https://camo.githubusercontent.com/459abe2d2d05bd6680bcd73ffb5a2b07687cf455e6c34c4696fbab32465f972b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656c6f756166696465762f7663662d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/elouafidev/vcf-generator)

A simple VCF (vCard) generator for Laravel. This package provides an easy way to generate VCF files for contacts in your Laravel applications. It supports adding various contact details such as full name, email addresses, phone numbers, addresses, social media profiles, and more.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require elouafidev/vcf-generator
```

Usage
-----

[](#usage)

Here is a simple example of how to use the VCF generator in your Laravel project:

```
use ElouafiDev\VCFGenerator\VCFGenerator;

$vcf = new VCFGenerator();
$vcf->setFullName('John Doe')
    ->setEmail('john.doe@example.com', VCFGenerator::WORK)
    ->setPhoneNumber('+123456789', VCFGenerator::WORK)
    ->setAddress('123 Main St, Anytown, USA')
    ->setTitle('Software Engineer')
    ->setDescription('Experienced software engineer with a passion for developing innovative programs.')
    ->setProfileImage150x150('/path/to/image.png')
    ->setFacebook('https://facebook.com/johndoe')
    ->setTwitter('https://twitter.com/johndoe')
    ->setLinkedin('https://linkedin.com/in/johndoe')
    ->setYoutube('https://youtube.com/johndoe')
    ->setInstagram('https://instagram.com/johndoe')
    ->setWebsite('https://johndoe.com')
    ->setSkype('johndoe');

return $vcf->download();
```

### Methods

[](#methods)

- `setFullName(string $full_name): self`
- `setEmail(string $email, string $type): self`
- `setPhoneNumber(string $phone, string $type): self`
- `setAddress(string $address): self`
- `setTitle(string $title): self`
- `setDescription(string $description): self`
- `setProfileImage150x150(string $profile_image_150x150): self`
- `setFacebook(string $url): self`
- `setTwitter(string $url): self`
- `setLinkedin(string $url): self`
- `setYoutube(string $url): self`
- `setInstagram(string $url): self`
- `setWebsite(string $url): self`
- `setSkype(string $url): self`
- `vcfContent(): string`
- `toBase64(): string`
- `toUri(): string`
- `download()`
- `validateEmail(string $email): bool`
- `validatePhoneNumber(string $phone): bool`
- `clear(): self`
- `setAttributes(array $attributes): self`

### Examples

[](#examples)

#### Generate VCF Content

[](#generate-vcf-content)

```
$vcfContent = $vcf->vcfContent();
echo $vcfContent;
```

#### Get VCF as Base64

[](#get-vcf-as-base64)

```
$vcfBase64 = $vcf->toBase64();
echo $vcfBase64;
```

#### Get VCF as Data URI

[](#get-vcf-as-data-uri)

```
$vcfUri = $vcf->toUri();
echo $vcfUri;
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Author
------

[](#author)

Mouad Elouafi

- Email:

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~25 days

Total

4

Last Release

635d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/617e5e2519385b214e8c5766f85789d878b1c24997c60cff3e13351b3fe59949?d=identicon)[elouafidev](/maintainers/elouafidev)

---

Top Contributors

[![elouafidev](https://avatars.githubusercontent.com/u/100081261?v=4)](https://github.com/elouafidev "elouafidev (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/elouafidev-vcf-generator/health.svg)

```
[![Health](https://phpackages.com/badges/elouafidev-vcf-generator/health.svg)](https://phpackages.com/packages/elouafidev-vcf-generator)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M682](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M210](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M857](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
