Download the PHP package vpominchuk/laravel-easy-share without Composer

On this page you can find all versions of the php package vpominchuk/laravel-easy-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 laravel-easy-share

laravel-easy-share

Laravel EasyShare is a fully customized and easy to use social share buttons component.

It is as easy as count to four

1. Install

2. Publish sample config file

3. Add a component to your view.

4. Add some CSS styles:

and you are ready to go!

Available social networks

Managing social networks

You can easily add/remove/enable/disable available social networks. Just open config/easy-share.php file and add any social network you like.

Configuration options

Option name Description
url Social network share url. It should include following keys: {url} - will be replaced with your. {title} - may be overwritten with your page title. {summary} - used for LinkedIn only, ok, let it be...
allowed To Enable / Disable
class Add any custom class to current share link
content To be placed as a content for <a href=''>$content</a> tag. Can be used to display any SVG icon or other text or even HTML
title To be placed as title attribute for <a href='' title='$title'>...

Using SVG icons

To use your own SVG icons just put content of your SVG icon file into content key of configuration file for the necessary icon.

Using Fontawesome or other icons library

The same as with SVG, just put <i class="fa-brands fa-twitter"></i> into content key of the config file.

Component parameters

By default, you can use <x-easy-share /> without any attributes, it will detect current url of the page, but will not detect page title.

Option name Description
url Page URL to be shared. Example: <x-easy-share url="https://example.com/" />
title Page title. Use :title="$title" to pass title from variable or title="My page title" to pass as text
summary Page summary. Used for LinkedIn only.
allow Allows you to enable disabled social links. Pass multiple social links via comma: allow="pinterest,reddit"
disable Disable some social links. Pass multiple social links via comma: disable="pinterest,reddit"

Custom attributes can be passed to custom template.

Using custom view (template)

To use custom template, just create a folder easy-share under resources/views/ and put your custom template in it.

Custom attributes in <x-easy-share /> component will be passed to your custom template.

All Kebab Cased and Snake Cased attributes will be transformed to Camel Case, for example:

will be transformed to {{$myFirstAttribute}} and {{$mySecondAttribute}}.

Getting share links as a PHP array

You can use EasyShare facade to get plain PHP array of share links. Example:

There are two additional methods:

Method Description
setAllowed(array) Enable some social share links. $easyShare->setAllowed(["reddit", "pinterest"]);
disable(array) Disable some social share links. $easyShare->setAllowed(["reddit", "pinterest"]);

Security

If you discover any security related issues, please use the issue tracker.

Credits

License

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


All versions of laravel-easy-share with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.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 vpominchuk/laravel-easy-share contains the following files

Loading the files please wait ...