wotz/laravel-social-media-share 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wotz/laravel-social-media-share

Composer 安装命令:

composer require wotz/laravel-social-media-share

包简介

A Laravel package for social sharing. This package is a rewrite from jorenvanhocht/laravel-share.

README 文档

README

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.

统计信息

  • 总下载量: 1.02k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固