laravel-notification-channels / onesignal

OneSignal notifications channel for Laravel
MIT License
277 stars 119 forks source link

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

Open umsuka opened 4 years ago

umsuka commented 4 years ago

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
        );
    }
AbanNova commented 3 years ago

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.

emmadedayo commented 2 years ago

remove Berkayk\OneSignal\ at the top of your controller