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(2y ago)0141MITPHPPHP &gt;=7.4

Since May 26Pushed 2y 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 2w 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

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

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

736d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/100081261?v=4)[ELOUAFI MOUAD](/maintainers/elouafidev)[@elouafidev](https://github.com/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

[illuminate/pagination

The Illuminate Pagination package.

12234.6M1.1k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9350.2M310](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.8M410](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

224.7M146](/packages/illuminate-cookie)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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