Achraf
Achraf

Reputation: 357

Cannot launch API Platform

I am trying out the Platform API framework that works with Symfony.

I am following their docs and trying to set up the little demo API.

https://api-platform.com/docs/distribution/#via-composer

Everything goes OK, at least I think.

When I run the server I see no UI.

I only see this text in my browser:

{
    "@context": "/contexts/Entrypoint",
    "@id": "/",
    "@type": "Entrypoint",
    "book": "/books",
    "person": "/people",
    "organization": "/organizations" 
}

instead of having this:

UI

Anyone knows what goes wrong here?

I am using composer for this little demo.

Upvotes: 0

Views: 567

Answers (1)

Kévin Dunglas
Kévin Dunglas

Reputation: 3024

Check the PHP version you use. Be sure to run PHP 7+ or Composer will install API Platform 1 (the UI was introduced in API Platform 2).

Upvotes: 1

Related Questions