Code Monkey home page Code Monkey logo

Comments (9)

vipertecpro avatar vipertecpro commented on August 24, 2024 2

I feel so blessed, that my code is going to be in someone else's new update (or even a small fix). That's only because the dev-master who wrote such a flexible code, if possible i would like to add all the social media around the web in it because well that's what this repo is for. Thank you so much again. Keep on updating and patching.

from laravel-share.

pqrs avatar pqrs commented on August 24, 2024 2

Thanks to you, @vipertecpro. As you see my PR is your code as you submitted so all the credit should be yours. I’m too for adding more social shares, I see someone proposed Pinterest a while ago. I’ll try when I find some time.

Cheers!

from laravel-share.

vipertecpro avatar vipertecpro commented on August 24, 2024 1

I think i've achieved to apply whatsapp share link, all you need to do is to change in the followings files :-

Go to : config/laravel-share.php
Add this to services :

        'whatsapp' => [
            'uri' => 'https://wa.me/?text=',
            'extra' => ['mini' => 'true']
        ], 

Go to : resources/lang/vendor/laravel-share/en/laravel-share-fa4.php
Add this to return :

'whatsapp' => '<li ><a target="_blank" href=":url" class=":class" id=":id"><span class="fa fa-whatsapp"></span></a></li>',

Go to : vendor\jorenvanhocht\laravel-share\src\Share.php
Add new function :

    /**
     * Whatsapp share link
     *
     * @return $this
     */
    public function whatsapp()
    {
        $url = config('laravel-share.services.whatsapp.uri') . $this->url;

        $this->buildLink('whatsapp', $url);

        return $this;
    }

Go to : vendor\jorenvanhocht\laravel-share\config\laravel-share.php
Add this to services :

        'whatsapp' => [
            'uri' => 'https://wa.me/?text=',
            'extra' => ['mini' => 'true']
        ], 

Go to : vendor/jorenvanhocht/laravel-share/resources/lang/en/laravel-share-fa4.php
Add this to return :
'whatsapp' => '<li><a href=":url" class="social-button :class" id=":id"><span class="fa fa-whatsapp"></span></a></li>',

Finally Use it in blade :-

{!!
     Share::page('http://jorenvanhocht.be', null, [], '', '')->facebook()->twitter()->googlePlus()->whatsapp()
!!}

from laravel-share.

jorenvh avatar jorenvh commented on August 24, 2024

I accept a good PR to add Whatsapp support

from laravel-share.

josephadah avatar josephadah commented on August 24, 2024

I'm also in support for this PR to add Whatsapp

from laravel-share.

pqrs avatar pqrs commented on August 24, 2024

Hi @jorenvh! I needed this whatsapp feature and took this code above by @vipertecpro and implemented it in a new fork. You can see it in pqrs/laravel-share.

I added a test for WhatsApp and it passes. I think everything is ok but I'm fairly new to all this about forks and pull requests and don't know exactly what to do to merge it (if you want, of course).

Best!

from laravel-share.

jorenvh avatar jorenvh commented on August 24, 2024

hi @pqrs can you create a PR for that fork please?

from laravel-share.

pqrs avatar pqrs commented on August 24, 2024

Sure! Let me know if it’s ok.

from laravel-share.

jorenvh avatar jorenvh commented on August 24, 2024

PR #30 by @pqrs was just merged into master. A new release will be tagged later today.

Thanks again @pqrs for contributing to this package

from laravel-share.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.