Search code examples
laravelpackagelaravel-blade

jorenvanhocht/laravel-share share only current page


I am using the package as https://packagist.org/packages/jorenvanhocht/laravel-share how can I implement this package to share only current page only

  {!! Share::page('https://medmax.com.np/', null, [], '<ul class="ul_social">', '</ul>')
        ->facebook()
        ->twitter()
        ->linkedin()
        ->whatsapp()!!}

Solution

  • Sharing the current url Instead of manually passing an url, you can opt to use the currentPage function. Share::currentPage()->facebook();