onesignal icon indicating copy to clipboard operation
onesignal copied to clipboard

Call to undefined method Berkayk\OneSignal\OneSignalFacade::send()

Open umsuka opened this issue 6 years ago • 2 comments

Hi

I am using Laravel 5.8 and v1.0 of this plugin. when I test it out with the code on read me I am getting this error : Call to undefined method Berkayk\OneSignal\OneSignalFacade::send()

Here is my notification file config

//Import
use OneSignal;

public function __construct($ticket)
    {
        $this->ticket = $ticket;
    }

public function via($notifiable)
    {
        return ['mail', 'database','OneSignal'];
    }
 public function toOneSignal($notifiable)
    {
        \OneSignal::sendNotificationUsingTags(
            "Some Message",
            array(toArray(["key" => "company_id", "relation" => "=", "value" => $this->ticket->company_id])),
            $url = null,
            $data = null,
            $buttons = null,
            $schedule = null
        );
    }

umsuka avatar Dec 04 '19 18:12 umsuka

I know this late ==> This happened because that you add another onesignal package which is it (Berkayk\OneSignal) and you have some conflicts due to (bad installation / or bad configuration / or error in importing) of either of these two packages.

AbanNova avatar Feb 12 '21 16:02 AbanNova

remove Berkayk\OneSignal\ at the top of your controller

emmadedayo avatar Jul 13 '22 22:07 emmadedayo