2017 © Pedro Peláez
 

library share

Share links with Laravel 4

image

thujohn/share

Share links with Laravel 4

  • Tuesday, May 20, 2014
  • by thujohn
  • Repository
  • 6 Watchers
  • 43 Stars
  • 12,450 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 4 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

Share

Share links with Laravel 4, (*1)

Build Status, (*2)

Installation

Add thujohn/share to composer.json., (*3)

"thujohn/share": "dev-master"

Run composer update to pull down the latest version of Share., (*4)

Now open up app/config/app.php and add the service provider to your providers array., (*5)

'providers' => array(
    'Thujohn\Share\ShareServiceProvider',
)

Now add the alias., (*6)

'aliases' => array(
    'Share' => 'Thujohn\Share\ShareFacade',
)

Usage

Get a link (example with Twitter), (*7)

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

Returns a string :, (*8)

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

Get many links, (*9)

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

Returns an array :, (*10)

{"facebook":"https:\/\/www.facebook.com\/sharer\/sharer.php?u=http%3A%2F%2Fwww.example.com&title=Link+description","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"}

Services available

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

The Versions

20/05 2014

dev-master

9999999-dev

Share links with Laravel 4

  Sources   Download

MIT

The Requires

 

laravel laravel4 share