Git Product home page Git Product logo

Comments (2)

uavn avatar uavn commented on July 26, 2024

@bldcaveman
I added possibility to remove a contact, but you need to do a few things:

  • update your composer dependencies, so v2.1.3 of laravel-mailjet will be downloaded;
  • add 'v4' configuration section to your mailjet config:
'mailjet' => [
    ...
    'v4' => [
        'call' => true,
        'options' => [
            'url' => 'api.mailjet.com',
            'version' => 'v4',
            'call' => true,
            'secured' => true
        ]
    ],
]
  • add \Mailjet\LaravelMailjet\Providers\ContactsServiceProvider::class, to your providers:
'providers' => [
    ...
    \Mailjet\LaravelMailjet\Providers\ContactsServiceProvider::class,
    ...
]
  • use it:
public function handle(ContactsV4Service $contactsV4Service)
{
    $response = $contactsV4Service->delete(351406781);
    ...
}

I also updated https://github.com/mailjet/laravel-mailjet/blob/master/README.md with this example.

from laravel-mailjet.

stephenstack avatar stephenstack commented on July 26, 2024

Hi,

The above is not working. Provider is registered, but class dependancy kicks in

ArgumentCountError

Too few arguments to function Mailjet\LaravelMailjet\Services\ContactsV4Service::__construct(), 0 passed in /var/www/html/www.rconfig.com/app/Console/Commands/MailJetTest.php on line 49 and exactly 1 expected

at vendor/mailjet/laravel-mailjet/src/Services/ContactsV4Service.php:23
19|
20| /**
21| * @param MailjetService $mailjet
22| */

23| public function __construct(MailjetService $mailjet)
24| {
25| $this->mailjet = $mailjet;
26| }
27|

1 app/Console/Commands/MailJetTest.php:49
Mailjet\LaravelMailjet\Services\ContactsV4Service::__construct()

from laravel-mailjet.

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.