onesignal
onesignal copied to clipboard
Call to undefined method Berkayk\OneSignal\OneSignalFacade::send()
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
);
}
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.
remove Berkayk\OneSignal\ at the top of your controller