happytodev/filament-social-networks

Filament plugin to set and display your social networks on your website

v0.2.1 2022-07-17 09:29 UTC

README

68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f737570706f72742d756b7261696e652e7376673f743d31

Filament plugin to set and display your social networks icons on your website

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

This is a filamentphp plugin. It helps you to define the social networks you use in the filament backend, and display it on your website using Blade component provided.

SCR-20220627-oj1 Display your social networks on your front with the help of Blade component provided in this plugin

SCR-20220628-pu3 List of all of your social networks

SCR-20220628-puf Detail of one of your social network

Functionnalities

  • possibility to add, modify, delete, list social networks among the following 21 :
    • DeviantArt
    • Discord
    • Facebook
    • Github
    • Instagram
    • LinkedIn
    • Medium
    • Pinterest
    • Reddit
    • Skype
    • Snapchat
    • Soundcloud
    • Telegram
    • TikTok
    • Tumblr
    • Twitch
    • Twitter
    • Vimeo
    • WattPad
    • WhatsApp
    • Youtube
  • easy to install as Filament plugin (see below)
  • possibility to use OrbitPHP or classical driver database
  • social networks icons provided by default via svgporn
  • possibility to add your custom icons if you want
  • possibility to activate or not a social network
  • by default link open in a new tab (target='_blank')

On the roadmap

  • add more social networks
  • improve form appearance
  • deactivate already selected social network
  • provide more Blade component to display on front
  • add localization
  • add possibility to search the social network in the list
  • if you have an idea of improvment, let me know !

Support us

If you want and if you can, you can sponsorship this project.

It will help me a lot ;-)

Installation

You can install the package via composer:

composer require happytodev/filament-social-networks

Database

Using filament-social-networks with Filament and Orbit driver

If you use Orbit as database driver, there is no migrations to launch.

Instead, you have to :

  • install Orbit
composer require ryangjchandler/orbit
  • publish model file directly by using :
php artisan vendor:publish --tag="filament-social-networks-model-with-orbit"

Using filament-social-networks with classical database drivers

You have to publish and run the migrations with:

php artisan vendor:publish --tag="filament-social-networks-migrations"
php artisan migrate
  • publish model file directly by using :
php artisan vendor:publish --tag="filament-social-networks-model-classical"

Others publishable files

To use default picture for Social Network, you have to publish assets :

php artisan vendor:publish --tag="filament-social-networks-assets"

Optionnaly, you can publish the config file with:

php artisan vendor:publish --tag="filament-social-networks-config"

This is the contents of the published config file:

return [
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-social-networks-views"

Usage

Connect to your Filament dashboard.

You will see a new entry in the menu Social Networks

By clicking on the 'New social network' button (in the top right corner), you can add a new group of social networks.

You have to give it a name that you need after to display it.

You can, also, decide to let it inactive for the moment.

In that group, you can add every available social networks. You can order them simply by drag and drop. Every social network added to a group can be active (by default) or inactive.

You can collapse one, many or all Social Networks you've set if you need

Don't forget to save when you are satisfied by your social network group.

When you're satisfied, you can use everywhere you want the Blade component provided by this plugin in your template file :

<x-happytodev-filament-social-networks name="video"/>

Et voilà !

Testing

composer test

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

License

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