jeroenvanrensen / laravel-share-links
Get social share links for 10+ platforms easily.
dev-main
2021-02-09 09:25 UTC
Requires
- php: ^7.1
- laravel/framework: ^8.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-04-09 16:31:11 UTC
README
Get social share links for 10+ platforms easily.
Example
Here is an example of how to use the package:
use JeroenvanRensen\ShareLinks\Share; Share::page('Example', 'http://example.org/')->facebook(); Share::page('Example', 'http://example.org/')->twitter(); Share::page('Example', 'http://example.org/')->email();
Installation
Run this command to install the package:
composer require jeroenvanrensen/laravel-share-links
And that's it! Now you can use the package.
Usage
use JeroenvanRensen\ShareLinks\Share; Share::page('Example', 'http://example.org/')->facebook(); Share::page('Example', 'http://example.org/')->twitter(); Share::page('Example', 'http://example.org/')->email(); Share::page('Example', 'http://example.org/')->sms(); Share::page('Example', 'http://example.org/')->linkedin(); Share::page('Example', 'http://example.org/')->reddit(); Share::page('Example', 'http://example.org/')->whatsapp(); Share::page('Example', 'http://example.org/')->telegram(); Share::page('Example', 'http://example.org/')->tumblr(); Share::page('Example', 'http://example.org/')->pinterest('https://via.placeholder.com/400');
Note: For the Pinterest link you have to add an image.