PHPackages                             chengkangzai/laravel-social-share-links - 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. chengkangzai/laravel-social-share-links

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

chengkangzai/laravel-social-share-links
=======================================

A laravel pacakge that generate social share link, thats all it does

v1.0.0(3y ago)28.1k↓50%1[1 PRs](https://github.com/chengkangzai/laravel-social-share-links/pulls)MITPHPPHP ^8.1

Since Jan 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/chengkangzai/laravel-social-share-links)[ Packagist](https://packagist.org/packages/chengkangzai/laravel-social-share-links)[ Docs](https://github.com/chengkangzai/laravel-social-share-links)[ RSS](/packages/chengkangzai-laravel-social-share-links/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (6)Used By (0)

A laravel package that generate social share link, that'ss all it does
======================================================================

[](#a-laravel-package-that-generate-social-share-link-thatss-all-it-does)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fcdef16e80fe71fcd204b259c5e93279780e4cedaed1310c10d865e5fbe77bf5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368656e676b616e677a61692f6c61726176656c2d736f6369616c2d73686172652d6c696e6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chengkangzai/laravel-social-share-links)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3909c5fbba1677d25862883aafb41948d4197c7b74f3b9107ef948aba1b197d3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6368656e676b616e677a61692f6c61726176656c2d736f6369616c2d73686172652d6c696e6b732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/chengkangzai/laravel-social-share-links/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/718886933402e6ce7098b76c5976bf560021d74f71ec84b464b1307db4057e3b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6368656e676b616e677a61692f6c61726176656c2d736f6369616c2d73686172652d6c696e6b732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/chengkangzai/laravel-social-share-links/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/72fc7ce1d1c3c5033a39e3a81210510cd70e118e3baa84ad04b2da85f6d403a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368656e676b616e677a61692f6c61726176656c2d736f6369616c2d73686172652d6c696e6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chengkangzai/laravel-social-share-links)

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

[](#installation)

You can install the package via composer:

```
composer require chengkangzai/laravel-social-share-links
```

Usage
-----

[](#usage)

#### Generate social share link for Single Social Media

[](#generate-social-share-link-for-single-social-media)

```
use Chengkangzai\LaravelSocialShareLinks\Enums\SocialMediaType;
use Chengkangzai\LaravelSocialShareLinks\SocialShareLinksBuilder;

$builder = new SocialShareLinksBuilder();
$link = $builder->url($url) // $url is optional, if not passed, it will use the current url
    ->facebook()
    ->build();

$facebookLink = $link[SocialMediaType::Facebook];
```

#### If you prefer to call it statically

[](#if-you-prefer-to-call-it-statically)

```
use Chengkangzai\LaravelSocialShareLinks\Enums\SocialMediaType;
use Chengkangzai\LaravelSocialShareLinks\SocialShareLinksBuilder;

$link = SocialShareLinksBuilder::make($url) // $url is optional, if not passed, it will use the current url
    ->facebook()
    ->build();

$facebookLink = $link[SocialMediaType::Facebook];
```

#### Generate social share links for Multiple Social Media

[](#generate-social-share-links-for-multiple-social-media)

```
use Chengkangzai\LaravelSocialShareLinks\Enums\SocialMediaType;
use Chengkangzai\LaravelSocialShareLinks\SocialShareLinksBuilder;

$builder = new SocialShareLinksBuilder();
$link = $builder->url($url)
    ->twitter()
    ->text('Hello World')
    ->hashtags(['laravel', 'social', 'share', 'links'])
    ->via('chengkangzai')
    ->build();

$twitterLink = $link[SocialMediaType::Twitter];
```

#### Generate social share links for multiple social media with `for` method

[](#generate-social-share-links-for-multiple-social-media-with-for-method)

```
use Chengkangzai\LaravelSocialShareLinks\Enums\SocialMediaType;
use Chengkangzai\LaravelSocialShareLinks\SocialShareLinksBuilder;

$builder = new SocialShareLinksBuilder();
$links = $builder->url($url)
        ->for([
            SocialMediaType::Facebook,
            SocialMediaType::Twitter,
        ])
        ->build();

$facebookLink = $links[SocialMediaType::Facebook];
$twitterLink = $links[SocialMediaType::Twitter];
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ching Cheng Kang](https://github.com/chengkangzai)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.7% 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 ~1 days

Total

2

Last Release

1205d ago

Major Versions

v0.1.0 → v1.0.02023-01-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/a370741c6674c16bdde48fe05be751779341eea55bf51bd75eb165e146a836fc?d=identicon)[chengkangzai](/maintainers/chengkangzai)

---

Top Contributors

[![chengkangzai](https://avatars.githubusercontent.com/u/43839286?v=4)](https://github.com/chengkangzai "chengkangzai (22 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")

---

Tags

laravelchengkangzailaravel-social-share-links

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/chengkangzai-laravel-social-share-links/health.svg)

```
[![Health](https://phpackages.com/badges/chengkangzai-laravel-social-share-links/health.svg)](https://phpackages.com/packages/chengkangzai-laravel-social-share-links)
```

###  Alternatives

[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

9169.0k4](/packages/marcelweidum-filament-expiration-notice)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[ziming/laravel-scrapingbee

A PHP Laravel Library for ScrapingBee

4310.6k](/packages/ziming-laravel-scrapingbee)

PHPackages © 2026

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