PHP code example of vpominchuk / laravel-easy-share
1. Go to this page and download the library: Download vpominchuk/laravel-easy-share library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vpominchuk / laravel-easy-share example snippets
use Illuminate\Support\Facades\URL;
use \VPominchuk\EasyShare\Facades\EasyShare;
$url = URL::current();
$easyShare = EasyShare::setUrl($url);
$array = $easyShare
->setTitle($pageTitle)
->setSummary($summary)
->getServices();
html
<ul class="easy-share">
@foreach($services as $name => $service)
<li class="easy-share-{{$name}} {{$service['class'] ?? ''}}">
<a href="{{$service['url'] ?? '#'}}" target="_blank" title="{{$service['title']}}">{!! $service['content'] ?? '' !!}</a>
</li>
@endforeach
</ul>