Buy me a coffee
Librarify. Creating an API with Symfony 5 is a complete course on Symfony 5 in which I tell how to develop an API from scratch using the FOS Rest Bundle (I tell the reasons for this decision in episode number 5). This API will allow us to manage our personal library, that is, it will allow us to:
Perform CRUD operations on our books.
Perform CRUD operations on authors.
Perform CRUD operations on the categories that we assign to them.
In addition, the course will also focus on good practices when working with Symfony. We will use services to group the logic, DTO's to manage forms and we will try to write controllers as short as possible.
My goal is also to dedicate the final chapters of the course to things as interesting as:
Creating an administrator using Easy Admin .
Add JWT authentication using the LexikJWTAuthenticationBundle bundle.
Deploy the project to an AWS EC2 instance using the PHP Deployer tool.
Dockerize the project.
As you can see, it is a complete course if you want to start working on Symfony and I intend to keep it updated as updates to this PHP framework come out.
This Symfony 5 course consists of the following chapters to date:
Chapter 1. Project setup
Chapter 2. Controllers and routes
Chapter 3. Services and container
Chapter 4. Database and integration with Doctrine
Chapter 5. FOS Rest Bundle
Chapter 6. Forms
Chapter 7. DTO's and image loading
Chapter 8. Services and PHP Unit
Chapter 9. Categories and Collection Type
Full playlist: https://www.youtube.com/playlist?list=PLC8ntN5__iMIAy9V6XO37Dx_bQ5V7zc-h
Clone the repository.
Make sure you have a MySQL server running on your computer.
Run composer install
in the root of the project.
Install database migrations: bin/console doctrine:migrations:migrate
.
Start the local development server: symfony server:start
.
Happy codding!