wotz/laravel-social-media-share

A Laravel package for social sharing. This package is a rewrite from jorenvanhocht/laravel-share.
1,328
Install
composer require wotz/laravel-social-media-share
Latest Version:v4.1.0
PHP:^8.3
License:MIT
Last Updated:Jul 22, 2026
Links: GitHub  ·  Packagist
Maintainer: Who Owns The Zebra

Laravel Social Media Share

Software License

This package allows you to drop a social media links component on any page in your application. It can be used using Font Awesome and some default css or renderless without any styling and dependencies using SVG's. This package is heavily inspired by the jorenvanhocht/laravel-share package.

Installation

You can install the package via composer:

composer require wotz/laravel-social-media-share

Publish the package config & resource files.

php artisan vendor:publish --tag=codedor-social-media-share

Usage

Add the following line to any blade template where you want the social media links to appear.

<x-social-media-share-share
    :title="$model->title"
    :summary="$model->intro"
/>

To pull in the CSS add this line to the bottom of your HEAD tag in your default.blade.php file

@stack('head')

To pull in the javascript add this line right before the closing BODY tag in your default.blade.php file

@stack('scripts')

This generates:

<div id="js-social-media-share" class="social-media">
    <ul class="social-media-share">
        <li>
            <a class="js-social-media-share" href="https://www.facebook.com/sharer/sharer.php?u=https://example.com/your-page">
                <i class="fab fa-lg fa-facebook-square"></i>
            </a>
        </li>
        <li>
            <a class="js-social-media-share" href="http://www.linkedin.com/shareArticle?mini=true&title=pageTitle&summary=pageSummary&url=https://example.com/your-page">
                <i class="fab fa-lg fa-linkedin-square"></i>
            </a>
        </li>
        <li>
            <a class="js-social-media-share" href="https://twitter.com/intent/tweet?text=pageTitle&url=https://example.com/your-page">
                <i class="fab fa-lg fa-twitter-square"></i>
            </a>
        </li>
    </ul>
</div>

Documentation

For the full documentation, check here.

Testing

vendor/bin/pest

Changelog

Please see CHANGELOG for more information on what has changed recently.

Upgrading

Please see UPGRADING for more information on how to upgrade to a new version.

Related Packages

overtrue/socialite

A collection of OAuth 2 packages that extracts from laravel/socialite.

5,855,206 1,374
mmanos/laravel-social

A social login package for Laravel 4.

6,814 54
adaojunior/passport-social-grant

Social grant for Laravel Passport

291,059 116
humweb/sociable

Socialite authentication and persistence layer implementation.

19,705 0
akaramires/laravel-fullcontact

Laravel FullContact

35,888 0

Version History

Version Released PHP Laravel License
v4.1.0 ^8.3 ^12.0|^13.0 MIT
v4.0.0 ^8.4 ^12.0 MIT
v3.4.0 ^8.1 ^10.0|^11.0|^12.0 MIT
v3.3.0 ^8.1|^8.2|^8.3 ^10.0|^11.0 MIT
v3.2.0 ^8.1 ^10.0 MIT