PHPackages                             anton-strui-general-soft/chencha-share - 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. [API Development](/categories/api)
4. /
5. anton-strui-general-soft/chencha-share

ActiveLibrary[API Development](/categories/api)

anton-strui-general-soft/chencha-share
======================================

Share links with Laravel

01PHP

Since Oct 1Pushed 1y agoCompare

[ Source](https://github.com/AntonStruiGeneralSoft/social-share)[ Packagist](https://packagist.org/packages/anton-strui-general-soft/chencha-share)[ RSS](/packages/anton-strui-general-soft-chencha-share/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Share
=====

[](#share)

**Share links with Laravel**

This is a fork of John's share for Laravel 4.

Services available
------------------

[](#services-available)

- Blogger : blogger
- Digg : digg
- Email : email
- Evernote : evernote
- Facebook : facebook
- Gmail : gmail
- LinkedIn : linkedin
- Pinterest : pinterest
- Reddit : reddit
- Scoop.it : scoopit
- Telegram.me : telegramMe
- Tumblr : tumblr
- Twitter : twitter
- vk.com : vk

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

[](#installation)

Install Composer dependency into your project

```
composer require chencha/share

```

Usage
-----

[](#usage)

Get a link (example with Twitter)

```
Route::get('/', function()
{
	return Share::load('http://www.example.com', 'My example')->twitter();
});

```

Returns a string :

```
https://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.example.com&text=Link+description

```

Get many links

```
Route::get('/', function()
{
	return Share::load('http://www.example.com', 'Link description')->services('facebook', 'twitter');
});

```

Returns an array :

```
{
    "twitter" : "https://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.example.com&text=Link+description",
    "facebook" : "https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.example.com&title=Link+description"
}

```

Get ALL the links

```
Route::get('/', function()
{
	return Share::load('http://www.example.com', 'Link description')->services();
});

```

Returns an array of results for all defined services.

Customization
-------------

[](#customization)

Publish the package config:

```
php artisan vendor:publish --provider='Chencha\Share\ShareServiceProvider'

```

Add a new service in config/social-share.php:

```
'mynewservice' => [ 'view' => 'share.mynewservice' ]

```

Add Blade templating code in *share.mynewservice* view file to generate a URL for *mynewservice*. You have access to:

- service - the service definition (shown above).
- sep - separator used between parameters, defaults to '&amp;'. Configurable as *social-share.separator*.
- url - the URL being shared.
- title - the title being shared.
- media - media link being shared.

Example:

```
https://mynewservice.example.com?url={{ rawurlencode($url) }}title={{ rawurlencode("Check this out! $title. See it here: $url") }}

```

Another example for the *email* service. Change the service config to be *\[ 'view' =&gt; 'whatever' \]* and put this in the view file:

```
mailto:?subject={{ rawurlencode("Wow, check this: $title") }}body={{ rawurlencode("Check this out! $title. See it here: $url") }}

```

Localizing? Easy, use Laravel's trans() call:

```
mailto:?subject={{ rawurlencode(trans('share.email-subject', compact('url', 'title', 'media'))) }}body={{ rawurlencode(trans('share.email-body', compact('url', 'title', 'media'))) }}

```

Create a file at resources/lang/en/share.php with your choice of subject and body. URLs arguably have a maximum length of 2000 characters.

Notice the use of . It's the only way to print out an unencoded ampersand (if configured that way).

Upgrades
--------

[](#upgrades)

When the package is upgraded, changes to the config and views should be republished into your project:

```
php artisan vendor:publish --provider='Chencha\Share\ShareServiceProvider'

```

Use source control to work out what has changed if you have customized the files.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.6% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c6dde09059a9dca8a1f6a218b3e42a0d8276e7a9ffb3d755af26de3178e64c9?d=identicon)[AntonStruiGeneralSof](/maintainers/AntonStruiGeneralSof)

---

Top Contributors

[![datashaman](https://avatars.githubusercontent.com/u/59514?v=4)](https://github.com/datashaman "datashaman (68 commits)")[![prodeveloper](https://avatars.githubusercontent.com/u/1224225?v=4)](https://github.com/prodeveloper "prodeveloper (11 commits)")[![AntonStruiGeneralSoft](https://avatars.githubusercontent.com/u/97613465?v=4)](https://github.com/AntonStruiGeneralSoft "AntonStruiGeneralSoft (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![ibrahim-mubarak](https://avatars.githubusercontent.com/u/47777720?v=4)](https://github.com/ibrahim-mubarak "ibrahim-mubarak (2 commits)")[![shanmuga3](https://avatars.githubusercontent.com/u/38732797?v=4)](https://github.com/shanmuga3 "shanmuga3 (2 commits)")[![thegr8dev](https://avatars.githubusercontent.com/u/33778557?v=4)](https://github.com/thegr8dev "thegr8dev (1 commits)")[![shaydy95](https://avatars.githubusercontent.com/u/24454741?v=4)](https://github.com/shaydy95 "shaydy95 (1 commits)")[![the94air](https://avatars.githubusercontent.com/u/18303390?v=4)](https://github.com/the94air "the94air (1 commits)")[![DaiSuanMung](https://avatars.githubusercontent.com/u/54679650?v=4)](https://github.com/DaiSuanMung "DaiSuanMung (1 commits)")

### Embed Badge

![Health badge](/badges/anton-strui-general-soft-chencha-share/health.svg)

```
[![Health](https://phpackages.com/badges/anton-strui-general-soft-chencha-share/health.svg)](https://phpackages.com/packages/anton-strui-general-soft-chencha-share)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M96](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

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