Good day,

I have a problem and cant seem to find a solution. My PHP API code works and I can send messages via the PHP API but whenever I try to add a platform with this line: ->addPlatform(Platform::ios()) there is an error.

Below is my code snippet:

$request = CreateMessageRequest::create(); $notification = Notification::create(); $notification->setContent('Hello World!'); $notification->addPlatform(Platform::ios());

$request->addNotification($notification);

In my PHP I get this error:

Fatal error: Class 'Platform' not found in /blah/blah.php on line 20

Has the addPlatform(Platform::device()) syntax changed by any chance or what could be the problem? Everything else works so far. I would be grateful if anyone can help me with this problem.

Thanks in advance!

asked 13 Apr '16, 14:03
Etienne's gravatar image

Etienne
111

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×326
×120
×33

question asked: 13 Apr '16, 14:03

question was seen: 501 times

last updated: 13 Apr '16, 14:03