Download the PHP package jorenvanhocht/laravel-share without Composer

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

Laravel Share

Latest Version on Packagist Build Status SensioLabsInsight Total Downloads

Share links exist on almost every page in every project, creating the code for these share links over and over again can be a pain in the ass. With Laravel Share you can generate these links in just seconds in a way tailored for Laravel.

Available services

Installation

You can install the package via composer:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

And optionally add the facade in config/app.php

Publish the package config & resource files.

You might need to republish the config file when updating to a newer version of Laravel Share

This will publish the config file to your config folder, in and in your folder.

Fontawesome

Since this package relies on Fontawesome, you will have to require it's css, js & fonts in your app. You can do that by requesting a embed code via their website or by installing it locally in your project.

Laravel share supports Font Awesome v5. For Font Awsome 4 support use version 3 of this package.

Javascript

Load jquery.min.js & share.js by adding the following lines to your template files.

Usage

Creating one share link

Facebook

Twitter

Reddit

Linkedin

Whatsapp

Telegram

Sharing the current url

Instead of manually passing an url, you can opt to use the currentPage function.

Creating multiple share Links

If want multiple share links for (multiple) providers you can just chain the methods like this.

This will generate the following html

Getting the raw links

In some cases you may only need the raw links without any html, you can get these by calling the getRawLinks method.

A single link

Outputs:

Multiple links

Outputs:

Optional parameters

Add extra classes, id's or titles to the social buttons

You can simply add extra class(es), id('s), title(s) or relationship(s) by passing an array as the third parameter on the page method.

Which will result in the following html

Custom wrapping

By default social links will be wrapped in the following html

This can be customised by passing the prefix & suffix as a parameter.

This will output the following html.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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


All versions of laravel-share with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.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 jorenvanhocht/laravel-share contains the following files

Loading the files please wait ....