Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Building a sample app with api-platform for backend, but lack of knowledge #501

@Rebolon

Description

@Rebolon

Hi,
i'm playing with Api-Platform on a Sf4 project where the aim is to write our guidelines to build apps in my client company. At the beginning i just wanted to show how to build an hybrid SPA application. I say hybrid coz it's served by Sf4 instead of being fully standalone, but it will allows us to bring this in existing application. I was surprised by how easy it is to bring VueJS or React into Symfony.
But, now i'm facing a new problem : for a more complex demo with complex forms, i need to build an api so i choose ApiPlatform which seems to be really interesting.

I did a simple data model with books/authors/editors/series... which lead to ManyToOne and kindOf ManyToMany (but splitted into ManyToOne with associative tables to allow more properties in association). Now i don't really know how to setup the Api :-(

Why ? my GET routes have circular reference exception (Books is linked to ProjectBookCreation which is linked to Authors and... Books), and my PUT/POST routes doesn't have overloded methods that allow to post all required information : to PUT/POST a book i wish to post at the same time all authors and editors linked to that book...

If you have any information s that might help me to build quickly this part of the app that would be cool.

The project is here (branch orm-for-form-demo) : https://github.com/Rebolon/php-sf-flex-webpack-encore-vuejs/tree/feature/orm-for-form-demo
The README.md should be enough to start the project (everything is done with NPM).
I will certainly write a new article on medium once all is done, and i will promote all libs/technologies used, and all persons that helped me !

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions