Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cap-Coding/symfony_api

Repository files navigation

How to build simple CRUD API service with Symfony 5 (for beginners)

Please watch the whole video tutorial here

Create a customer:

curl --location --request POST 'http://localhost:8080/api/v1/customers' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "test.email@gmail.com",
    "phoneNumber": "+49116012345678"
}'

Create a product:

curl --location --request POST 'http://localhost:8080/api/v1/products' \
--header 'Content-Type: application/json' \
--data-raw '{
    "code": "test_code",
    "title": "Test title",
    "price": 1234
}'

Create a cart:

curl --location --request POST 'http://localhost:8080/api/v1/customers/cart' \
--header 'Content-Type: application/json' \
--data-raw '{
    "customer": 1,
    "products": [
        1
    ],
    "dateTime": "2020-08-05 12:15:00"
}'

Other video tutorials

Code faster with Github Copilot

There is a video

Create a classic website using Symfony 5

There is a video

Delay "heavy" tasks in Symfony with component Messenger

There is a video

Delay heavy tasks in Symfony with kernel.terminate event to decrease response time

There is a video

Create Symfony 5 project with Docker and Postgres

There is a video

Design pattern "Chain of responsibility" (Symfony implementation)

There is a video

How to use data transfer objects (DTO) in Symfony API application

There is a branch and here is a video

How to build simple CRUD API service with Symfony 5 (for beginners)

There is a branch and here is a video

How to use Symfony Form Events in API service

There is a video

How to use object factories with Symfony Forms

There is a video

Dockerize WordPress

There is a video

Get trusted SSL certificate (https) for free with Let's Encrypt and Certbot

There is a video

Sponsor this project

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.