-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined class OneSignal #20
Comments
I didn't understand your question. Is it working or not? |
@ahadabasi , you should add |
Thanks, by add "use OneSignal" this is working. |
@ahadabasi you can close the issue :) |
Hi! "use OneSignal" does not work: |
i am getting Call to undefined function Berkayk\OneSignal\tap() |
did you solve it? |
add "use OneSignal" this is working. |
Yes, I added, but it's not working! I'm getting: |
I think it's because I'm working on 5.2, and tap helper is included in Laravel 5.4+. |
I made a workaround, is making a helper function
|
function tap($value, $callback) |
function tap($value, $callback) |
same here... Undefined type 'OneSignal'. |
Same here! I have this error in VSCode: use OneSignal;
class SendPushNotification implements ShouldQueue
{
// ...
public function handle(): void
{
OneSignal::sendNotificationToSegment(
"Test message with custom heading and subtitle",
"Testers",
null,
null,
null,
null,
"Custom Heading",
"Custom subtitle"
);
}
} @berkayk can this issue be reopened? Or can you provide a solution/suggestions? |
Pull request #153 solves this! Please merge it |
Undefined class OneSignal
OneSignal::sendNotificationToAll("Some Message");
I added this codes to config/app.php
'providers' => [ // ... Berkayk\OneSignal\OneSignalServiceProvider::class, ];
and
'aliases' => [ // ... 'OneSignal' => Berkayk\OneSignal\OneSignalFacade::class, ];
Also i run this command
php artisan config:clear
php artisan config:cache
But Undefined class OneSignal, i run
composer dumpauto
command and this worked. I use phpStorm, now i must typed methods name full and phpStorm doesn't complete method names.The text was updated successfully, but these errors were encountered: