Closed alimuhnad closed 5 years ago
you can use this code direct on your controller fcm() ->toTopic($topic) // $topic must an string (topic name) ->notification([ 'title' => 'Test FCM', 'body' => 'This is a test of FCM', ]) ->send();
please check the documentation once more
thank you for replay ...... how can i use it directly without call it from the model ??? i trying to use it on ionic 3 i have one more Q. if i want to send notfcation for one user its need token how can i get it ?
@alimuhnad you get the token from your frontend device. With ionic you could use the firebase plugin here
i need to send notfy by using controller plz help?