File tree 1 file changed +40
-0
lines changed 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Symfony 5 CRUD API service
2
+
3
+ Please watch the whole video tutorial [ here] ( https://www.youtube.com/watch?v=tbXpX4dAqjg )
4
+
5
+ Create a customer:
6
+
7
+ ``` sh
8
+ curl --location --request POST ' http://localhost:8080/api/v1/customers' \
9
+ --header ' Content-Type: application/json' \
10
+ --data-raw ' {
11
+ "email": "test.email@gmail.com",
12
+ "phoneNumber": "+49116012345678"
13
+ }'
14
+ ```
15
+
16
+ Create a product:
17
+
18
+ ``` sh
19
+ curl --location --request POST ' http://localhost:8080/api/v1/products' \
20
+ --header ' Content-Type: application/json' \
21
+ --data-raw ' {
22
+ "code": "test_code",
23
+ "title": "Test title",
24
+ "price": 1234
25
+ }'
26
+ ```
27
+
28
+ Create a cart:
29
+
30
+ ``` sh
31
+ curl --location --request POST ' http://localhost:8080/api/v1/customers/cart' \
32
+ --header ' Content-Type: application/json' \
33
+ --data-raw ' {
34
+ "customer": 1,
35
+ "products": [
36
+ 1
37
+ ],
38
+ "dateTime": "2020-08-05 12:15:00"
39
+ }'
40
+ ```
You can’t perform that action at this time.
0 commit comments