PHPackages                             hilioski/social-share-and-meta-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. hilioski/social-share-and-meta-generator

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

hilioski/social-share-and-meta-generator
========================================

Share links with Laravel 5 and meta generator

5.2.4(9y ago)1870MITPHPPHP &gt;=5.4.0

Since Feb 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/djkiko20/social-share)[ Packagist](https://packagist.org/packages/hilioski/social-share-and-meta-generator)[ RSS](/packages/hilioski-social-share-and-meta-generator/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (4)Versions (8)Used By (0)

Share
=====

[](#share)

Share links with Laravel 5 and meta generator

This is a fork to Checha share for Laravel 5.

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

[](#services-available)

- Delicious : delicious
- Digg : digg
- Email : email
- Evernote : evernote
- Facebook : facebook
- Gmail : gmail
- Google Plus : gplus
- LinkedIn : linkedin
- Pinterest : pinterest
- Reddit : reddit
- Scoop.it : scoopit
- Tumblr : tumblr
- Twitter : twitter
- Viadeo : viadeo
- vk.com : vk

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

[](#installation)

Step 1 : Install Composer dependency

```
composer require hilioski/social-share-and-meta-generator

```

Step 2 : Register the Service Provider

Add *Chencha\\Share\\ShareServiceProvider* to providers array in *config/app.php*

Step 3 : Register Alias

Add *Share* =&gt; *Chencha\\Share\\ShareFacade* to aliases array in *config/app.php*

Usage
-----

[](#usage)

Generate OG Meta data

```
Share::generateMeta(
    'http://www.example.com',
    'website',
    'My example',
    'http://www.example.com/img/header-bg.jpg',
    'Example.com',
    'Some description about the page'
);

```

Definition of `generateMeta()` function is:

```
generateMeta($url = '', $type = 'website', $title = '', $image = '', $site_name = '', $description = '')

```

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', 'gplus', 'twitter');
});

```

Returns an array :

```
{
    "gplus" : "https://plus.google.com/share?url=http%3A%2F%2Fwww.example.com",
    "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).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

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

###  Release Activity

Cadence

Every ~93 days

Recently: every ~44 days

Total

7

Last Release

3543d ago

PHP version history (3 changes)5PHP &gt;=5.3.0

5.1.0PHP &gt;=5.6.0

5.2.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/07b416c8ebc8ff341bc61164970eec2a9bcc0ffa00a7250603985a762d2f7593?d=identicon)[hilioski](/maintainers/hilioski)

---

Top Contributors

[![datashaman](https://avatars.githubusercontent.com/u/59514?v=4)](https://github.com/datashaman "datashaman (24 commits)")[![prodeveloper](https://avatars.githubusercontent.com/u/1224225?v=4)](https://github.com/prodeveloper "prodeveloper (11 commits)")

---

Tags

laravelgeneratorsociallaravel5metashareog

### Embed Badge

![Health badge](/badges/hilioski-social-share-and-meta-generator/health.svg)

```
[![Health](https://phpackages.com/badges/hilioski-social-share-and-meta-generator/health.svg)](https://phpackages.com/packages/hilioski-social-share-and-meta-generator)
```

###  Alternatives

[brexis/laravel-workflow

Integerate Symfony Workflow component into Laravel.

283125.6k](/packages/brexis-laravel-workflow)[torann/laravel-meta-tags

A package to manage Header Meta Tags

65273.3k4](/packages/torann-laravel-meta-tags)[dcblogdev/laravel-module-generator

Generate Laravel Modules from a template.

7710.1k1](/packages/dcblogdev-laravel-module-generator)[ryannielson/shareable

A Laravel 4 package to make it easy to add social sharing buttons to your application.

222.8k](/packages/ryannielson-shareable)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

295.1k](/packages/linkxtr-laravel-qrcode)[fomvasss/laravel-meta-tags

A package to manage SEO (meta-tags, xml-fields, etc.)

3028.9k](/packages/fomvasss-laravel-meta-tags)

PHPackages © 2026

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