Skip to content

Add a recipe for API Platform Admin #503

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

Merged
3 commits merged into from
Dec 10, 2018
Merged

Add a recipe for API Platform Admin #503

3 commits merged into from
Dec 10, 2018

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Dec 8, 2018

Q A
License MIT

admin-demo-97cd2738071d63989db0bbcb6ba85a25

This PR makes it easy to use API Platform Admin in a traditional Symfony app (an app using Twig).

The recipe installs Webpack Encore and API Platform (using their respective packs) and generate a Twig template, a route and the appropriate code to load the admin in a standard Symfony page.

It works in a different way than in the "official" distribution of API Platform:

  • in API Platform, the admin is a standalone Progressive Web App that must be hosted as a static website (using GitHub Page, Netlify or similar solutions)
  • when using this recipe, the React component is loaded directly inside the existing Symfony application, through a Twig template (so it is not installable as a PWA, but doesn't require to setup a different server, CORS headers...).

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request passes validation.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request passes validation.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request passes validation.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same route prefix as easyadmin but both won't be installed together I suppose)

@ghost ghost merged commit 98798d9 into symfony:master Dec 10, 2018
ghost pushed a commit that referenced this pull request Dec 10, 2018
@dunglas dunglas deleted the api-admin branch December 10, 2018 11:34
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants