2017 © Pedro Peláez
 

library soc-share

Social network share link builder

image

yaro/soc-share

Social network share link builder

  • Monday, March 13, 2017
  • by Cherry Pie
  • Repository
  • 1 Watchers
  • 8 Stars
  • 1,160 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 9 Versions
  • 3 % Grown

The README.md

SocShare

Link builder for social share button for Laravel 5., (*1)

Installation

Add dependency to composer.json:, (*2)

"require": {
    "yaro/soc-share": "1.*"
}

Add to config/app.php:, (*3)

'providers' => array(
//...
    Yaro\SocShare\ServiceProvider::class,
//...
),
'aliases' => array(
//...
    'SocShare' => Yaro\SocShare\Facade::class,
//...
),

Then run command:, (*4)

$ php artisan vendor:publish --provider="Yaro\SocShare\ServiceProvider"

Usage

Currently supported networks: google+, facebook, twitter, vkontakte, pinterest, tumblr, odnoklassniki, linkedin.br/ Ex:, (*5)

<a href="{{ SocShare::gplus()->getUrl() }}" target="_blank">Google+ ({{ SocShare::gplus()->getCount() }})</a>
<a href="{{ SocShare::pinterest(['media' => asset('/img/pin.png'), 'description' => 'oh hai'])->getUrl() }}" target="_blank">Pin it!</a>

To get share count call getCount() ia your network provider with the same parameters:, (*6)

<a href="{{ SocShare::pinterest(['media' => asset('/img/pin.png'), 'description' => 'oh hai'])->getUrl() }}" target="_blank">
    Already {{ SocShare::pinterest(['media' => asset('/img/pin.png'), 'description' => 'oh hai'])->getCount() }}
</a>

Or go with js to open share dialog in new window:, (*7)

{{ SocShare::renderJs() }}

<a onclick="{{ SocShare::vk()->getJs() }}" href="javascript:void(0);">Share me</a>

All parameteres listed in config file., (*8)

The Versions

13/03 2017

dev-master

9999999-dev

Social network share link builder

  Sources   Download

MIT

The Requires

 

laravel social share

13/03 2017

1.0.4

1.0.4.0

Social network share link builder

  Sources   Download

MIT

The Requires

 

laravel social share

02/03 2017

1.0.3

1.0.3.0

Social network share link builder

  Sources   Download

MIT

The Requires

 

laravel social share

17/11 2016

1.0.2

1.0.2.0

Social network share link builder

  Sources   Download

MIT

The Requires

 

laravel social share

23/09 2015

1.0.1

1.0.1.0

Social network share link builder

  Sources   Download

MIT

The Requires

 

laravel social share

16/09 2015

1.0.0

1.0.0.0

Social network share link builder

  Sources   Download

MIT

The Requires

 

laravel social share

05/05 2015

0.3

0.3.0.0

Social network share link builder

  Sources   Download

The Requires

 

19/02 2015

0.2

0.2.0.0

Social network share link builder

  Sources   Download

The Requires

 

18/02 2015

0.1

0.1.0.0

Social network share link builder

  Sources   Download

The Requires