wotz/laravel-social-media-share

A Laravel package for social sharing. This package is a rewrite from jorenvanhocht/laravel-share.
1,313
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

humweb/sociable

Socialite authentication and persistence layer implementation.

19,586 0
edujugon/social-auto-post

PHP and Laravel 5 Package to post on Twitter

5,903 13
mmanos/laravel-social

A social login package for Laravel 4.

6,813 54
adaojunior/passport-social-grant

Social grant for Laravel Passport

290,195 116
gzero/social

Gzero Social Plugin

1,285 0