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

In this #programming tutorial I explain how to build a CRUD API service based on popular #PHP framework #Symfony. As an example I demonstrate a flow of adding products by customer into shopping cart. I made a focus on beginners,…

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

Source

0
(0)

In this #programming tutorial I explain how to build a CRUD API service based on popular #PHP framework #Symfony.
As an example I demonstrate a flow of adding products by customer into shopping cart.
I made a focus on beginners, who just started using Symfony. But there are also some details which can be interesting for more skilled developers.
I use Symfony 5 and PHP 7.4 but this video is also relevant for older versions of Symfony and PHP.
To send request I use a great free tool Postman https://www.postman.com/

In this video I don’t explain how to connect database to the project. I’ve explained how it can be done in my other video https://youtu.be/4UrPI6Y3BWA?t=808 (I use docker but technic is almost the same).

⭐️ Final result ⭐️
🔗 https://github.com/Cap-Coding/symfony_api/

⭐️ Support channel on Patreon ⭐️
🔗 https://www.patreon.com/capcoding

⭐️ Resources ⭐️
🔗 Symfony Form Type https://symfony.com/doc/current/reference/forms/types.html
🔗 FOS Rest bundle https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
🔗 Book O’Reilly “Head first design patterns”
Amazon: https://amzn.to/2KVHD0D (new edition)
Amazon: https://amzn.to/2NMfTN9
Amazon DE: https://amzn.to/2Xq3TCt

🎥 All tutorials for Symfony CRUD API https://www.youtube.com/playlist?list=PLKQc-wMFDsrEt6U5LKLETR2d4nhW0ieNI

Get € 20 on Hetzner Cloud hosting:
💲 https://hetzner.cloud/?ref=GyXEuMSuxUBq

Register domain without hassle on GoDaddy
💲https://letyshops.com/r/godaddy-87becf0c4e38

⭐️ TABLE OF CONTENT⭐️

00:00:00 Introduction
00:00:33 Creating entities
00:05:00 Creating CustomerController
00:06:25 Creating Doctrine migration
00:06:59 Defining customer’s routes
00:08:09 Adding Customer FormType
00:09:33 Creating abstract API Controller
00:11:00 Adding createAction for customer
00:12:28 Testing creating a new customer
00:13:50 Installation FOS Rest bundle
00:15:02 Rendering form’s errors
00:16:42 Adding form’s validations
00:17:46 Creating CRUD for Product
00:21:35 Creating CRUD for Cart

0 / 5. 0