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

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

Cap Coding

4 года назад

95,708 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Cap Coding
Cap Coding - 07.06.2020 12:20

Guys, what else do you want to learn from me? Comment down below and let me know so I create more tutorials for you.

Ответить
Mr. Vader
Mr. Vader - 15.10.2023 02:14

Отличное видео! Спасибо. А можно ли вынести логику из контроллеров в сервисы? и можно в сервисе использовать функции из AbstractApiController?

Ответить
Saimcan Sesigür
Saimcan Sesigür - 16.10.2022 20:51

Thanks for the video. For the ones will build a form with a PUT request, should pass method PUT as follows:

$form = $this->buildForm(ProductType::class, $user, [
"method" => "PUT"
]);

Ответить
Nasim Uddin
Nasim Uddin - 31.07.2022 19:46

Thanks you so much for best tutorial

Ответить
Jan Janusz Nosacz
Jan Janusz Nosacz - 28.07.2022 15:33

Imho rating this video greatly depends on what are your expectations.

If you're a beginner and would like to know how to create a CRUD API from scratch in Symfony and really understand what's going on, this is not a place for you. Almost nothing is explained, author works very fast and to newbies it's very difficult to comprehend what's going on.

But if you consider this vid as a step by step instruction how to make CRUD API, then I guess it suits your needs, but you have to have a solid background in Symfony.


I must say I belong to the former group, so after 10 minutes of watching I decided to look for some other tutorial :) But I hope someone finds it useful :)

Ответить
Sk Imran
Sk Imran - 26.07.2022 10:42

In your video coding looking so small can you zoom it

Ответить
Al Alif
Al Alif - 24.07.2022 18:43

Sir ভিডিও টা পছন্দ হয়েছে এরকম ভিডিও আরো বানাবেন

Ответить
Norma Henao
Norma Henao - 21.07.2022 02:00

This is unique, thanks for sharing this tutorial. This is so simply way to learn.!

Ответить
sultan mia
sultan mia - 20.07.2022 20:03

Nice 🧡

Ответить
Homayon HD Media
Homayon HD Media - 19.07.2022 04:32

good video

Ответить
Kesh Vithanage
Kesh Vithanage - 16.07.2022 20:55

Thank you so much for this tutorial 👍🏻

Ответить
Rahman Abdur
Rahman Abdur - 21.02.2022 11:41

i rally njoyd watching this vidos. i want more videos lik this

Ответить
Shah G
Shah G - 10.02.2022 10:30

good video

Ответить
Shah G
Shah G - 10.02.2022 10:29

nice

Ответить
Evan Khan
Evan Khan - 07.02.2022 11:26

Nice tutorial video

Ответить
Attitude Girl
Attitude Girl - 30.01.2022 07:48

Nice video

Ответить
thedevilz
thedevilz - 28.01.2022 09:35

Respectfully, Your tutorial is for sure not for the beginners the reason you're not explaining why you are creating any piece of code, what's the reason of creating your abstract class and how it's all connected. Thank you

Ответить
ugya marma (education information)
ugya marma (education information) - 27.01.2022 21:01

Hey! Thank you very much for this tutorial.

Ответить
Ivan Pishkin
Ivan Pishkin - 16.01.2022 16:02

I don't understand that.

Ответить
Mahdi Hasan
Mahdi Hasan - 15.01.2022 09:19

Like it

Ответить
Kumar Jayantha
Kumar Jayantha - 09.01.2022 15:35

Jimtnee

Ответить
Dun X
Dun X - 29.12.2021 04:11

P

Ответить
Babok
Babok - 27.12.2021 15:37

Hello, How created options / header / put response?

Ответить
Babok
Babok - 19.12.2021 21:04

In the video, we use Postman for api testing. How to download and send data in the page controller to display data on the page (return $ this-> render ('posts / products.html.twig)? How to send json query to api and retrieve data? Have a nice day!

Ответить
Владислав Сергеевич
Владислав Сергеевич - 17.11.2021 10:13

Где звуковую дорожку сменить :D Я еще не готов к английскому переходить :D

Ответить
aa Khan
aa Khan - 04.11.2021 18:34

Nic

Ответить
Alex Averkiyev
Alex Averkiyev - 30.09.2021 15:34

On Form validation error it should return status code 422 instead of 400, since your app recognized the request data and its structure.

Ответить
soukaina bouzayan
soukaina bouzayan - 09.09.2021 20:21

hi, ever when I use fosbundle it still get a "not valid form" in response

Ответить
Oumaima Ben Jouida
Oumaima Ben Jouida - 01.09.2021 00:28

your amazing thank you so much I learned a lot from you. please add videos like that and also we wish if you can create a Symfony project from scratch so we can learn more from you.

Ответить
Sachin Sehrawat
Sachin Sehrawat - 24.08.2021 12:41

"error": "access_denied",
"error_description": "OAuth2 authentication required"

Ответить
Boris Vian
Boris Vian - 24.08.2021 11:53

there's an error in AbstractApiController:

The option "csrf_protection" does not exist.

UPDATE: I've managed to solve it by passing this argument to "setDefaults" in Type file:

$resolver->setDefaults([
'data_class' => Cart::class,
'csrf_protection' => false,
]);

Ответить
Giannis tsiv
Giannis tsiv - 11.08.2021 11:32

I get this error when trying to add products to cart

An exception occurred while executing 'INSERT INTO app_cart (customer, product) VALUES (?, ?)' with params [{}, {}]:\n\nWarning: Object of class App\\Entity\\customer could not be converted to int

Ответить
Michael Brauner
Michael Brauner - 03.08.2021 19:30

I love watching your videos!
Can I ask something?

Ответить
Juan Luis Herrera
Juan Luis Herrera - 02.08.2021 16:22

Hi, nice video. Everything was ok until I install friendsofsymfony: now this error appears "Argument 1 passed to Doctrine\ORM\Mapping\Index::__construct() must be of the type array or null, string given, called in /home/jluishg/progra/symfony/scgadm/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php on line 971" Can you help me?

Ответить
Milje1110
Milje1110 - 16.07.2021 23:07

Hi there I have a question...
Did you have problems while sending an empty JSON body on a PUT/PATCH request? Since it's an empty request the form->isSubmited returns false but I'm not getting any validation errors returned since an object is fetched from the database first and is passed to the form as a parameter

Ответить
Kenner
Kenner - 01.06.2021 22:52

which IDE is that?

Ответить
???
??? - 15.05.2021 22:52

Nice Tutorial! How to create an new Product with the same request that creates an new Card? Using a valid json instead of the id

Ответить
Miqayel Harutyunyan
Miqayel Harutyunyan - 20.04.2021 15:10

this guy have skills

Ответить
Miqayel Harutyunyan
Miqayel Harutyunyan - 19.04.2021 16:35

but why is your github repository without controllers

Ответить
Kaushik Makwana
Kaushik Makwana - 10.04.2021 21:53

Thank you for your tutorial. but for the beginners, few things missings
1. Symfony installations
2. Database Connection
3. Its contain lot of copy-paste, if you write code then it is good for beginners

Thanks :)

Ответить
Оксана Горобей
Оксана Горобей - 09.04.2021 22:03

Классный туториал, но были моменты о которых ты не упомянул, так как возможно для тебя они очевидны, но для меня перейдя с другого фреймворка это было неожиданным, и реально часа два гуглила как решить проблему. Но вообще лучший из всех что видела!

Ответить
Yazılım okusaydın
Yazılım okusaydın - 02.04.2021 08:38

Dude has skills.

Ответить
Гойко Митич
Гойко Митич - 02.03.2021 11:26

у вас в репозитории в src лежат пустые папки

Ответить
DaFaGe
DaFaGe - 26.01.2021 16:14

Why not generate entity class from command line?

Ответить
Raj KB
Raj KB - 22.11.2020 21:55

Why not use api-platform than fos-rest-api?

Ответить
B0re
B0re - 18.11.2020 16:04

The thing that I'm missing in your tutorial is some simple pagination service(library/own solution) it's quite crucial to paginate your GET response, also POST should return status code 201 not 200 other than that pretty good stuff for begginers :)

Ответить
MEHDI NAIMI
MEHDI NAIMI - 16.11.2020 15:32

Hello thanks for this video but i wanna know why you used "AbstractApiController". that difcult no ???

Ответить
Noam
Noam - 28.10.2020 22:24

You create and execute migration, but you don't say anything about connecting to DB

Ответить