Download the PHP package tapp/filament-social-share without Composer

On this page you can find all versions of the php package tapp/filament-social-share. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-social-share

Filament Social Share

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

An action that allows users to share the current URL (or provide a custom one) on social media platforms, through email, or copy the link. It could be also used the web share API (supported by certain browsers).

[!IMPORTANT]
The web share API and copy to clipboard require HTTPs to work.

Appareance

Action button

Modal

Dependencies

Installation

You can install the package via composer:

You can publish the config using:

This is the contents of the published config file:

To apply the plugin styles, add to the your Filament theme.css file:

Usage

The share action can open the native browser share or a Filament modal with options to share on X, Facebook, Linkedin, Reddit, or Email.

Using Native Browser Web Share API

Add the ->nativeBrowserShare() to display the native browser share:

Using modal with social plataform options

When ->nativeBrowserShare() is not provided a modal will be opened with options to share on social plataforms or email. The social plataforms available are in the example below:

Options available

Below you can see all the options available to the SocialShareAction.

[!NOTE]
Any icon supported by Blade UI kit can be used for the social share icons.

URL to Share

Default is current URL.

Provide a custom URL to share:

Text

Default is the title.

Provide the text to share:

Twitter/X

To add X share button, add the x method providing the user:

Facebook

To add Facebook share button:

LinkedIn

To add LinkedIn share button:

Reddit

To add Reddit share button:

Email

To add Email share button:

Native Browser Share

Enable native browser Web Share API:

Process Customization

Add custom logic before or after the sharing process:

Default Colors

The plugin comes with sensible default colors for each platform:

Different Approaches to Define Configurations

Using named parameters in main social plataform method

Using pure dedicated methods

Mixed approach (Maximum Flexibility)

Conditional/Dynamic Configuration

Customizing the action

Any method available to Filament action can be used, for example, to use an icon instead of button for share action:

Executing code before or after the action

The before() and after() methods could be used to execute some extra logic before or after the action:

Example: Send Notification After Sharing

Example: Log Sharing Activity

Example: Custom Authorization Check

Example: Track Analytics

Testing

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

Inspired by PenguinUI.

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-social-share with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^5.0|^4.0
owenvoke/blade-fontawesome Version ^2.9
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tapp/filament-social-share contains the following files

Loading the files please wait ...