
Know a little about the instructor and some interesting details of the course.
Before starting to create things, it is important to understand the goals. See how everything should work along to the features of the microservices architecture.
Through the question system, you can solve your doubts, but it is very important that you ask them in the right way to help you better.
Here I explain a little about the development environment that I recommend to follow the course. However, you are free to use the tools with which you feel best to follow the course.
It is time to obtain the structure of Lumen, using composer to start with the microservice of authors.
Here I share the details about the different repositories where you can find the source code of the microservices and components implemented with Lumen during the course.
Once you have the Lumen structure, you have to prepare and configure some components so that the microservice works correctly
With migrations, you can create the structure of the table that will store the information related to the authors that will manage the microservice.
Through the model, you can access the full power of Eloquent, the ORM of Lumen, to manage the authors of the microservice easily.
Creating a Factory for the authors in the microservice will allow to easily generating test data that will help fill the database with Lumen.
The controller will allow you to build the actions that will be in charge of managing the authors of the microservice, all through Lumen and its ORM.
The routes will help you build that bridge between the actions of your controller and the URLs through which you would access the microservice.
It is important that you be consistent in the format and type of responses that all your services return. In this class, you will centralize this to standardize the answers.
The first method to implement is the index method, which will return the full list of microservice authors.
The store method of the driver will allow you to create new author instances for the microservice. Everything, using Lumen and its ORM.
The show method receives the path parameter that will allow you to identify a single author and return it as a response from the microservice. In addition, Lumen will help you control the possibility that this id does not exist
The update method will help you identify and edit an existing author of the microservice with Lumen.
By implementing the destroy method of the driver, you can remove an existing author from the microservice.
You must make sure you are consistent in all possible microservice responses, and that includes error responses as well.
Get the structure of Lumen, using composer to start with the microservice of books
You must prepare and configure some components of Lumen so that the microservice works correctly
With the migrations, you will create the structure of the table that will contain the information related to the books that this microservice is responsible for.
Through the model, you can access the full power of Eloquent, the ORM of Lumen, and manage the books of this microservice easily.
Create a Factory for the books in this microservice, and generate test data that will help fill the database with Lumen.
Build the actions that will be responsible for managing the books that will be responsible for this microservice with Lumen.
The routes will help you build the bridge between the actions of your controller and the URLs through which you will access the microservice.
You must maintain the same format and response structure of the authors' service in this microservice.
The index method will allow you to return the complete list of books of this microservice.
Allows you to create new instances of books, implementing the controller's store method
The show-receive method allows you to identify and return the details of an existing book in response to the microservice. Lumen will help you control the possibility that this id does not exist
The update method will allow you to identify and edit an existing microservice book with Lumen.
The destroy method of the controller will allow you to delete an existing microservice book.
Make sure you always return valid answers and in the proper format even in case of error.
Get the structure of a new Lumen project where you will implement all the components of the Gateway API.
Configure the Gateway to function and act correctly with Lumen.
The Gateway will center the functions of all the microservices so it will be necessary to create Lumen controllers for each one
You must maintain the format and structure of the answers in all your microservices, and this includes especially the Gateway that must centralize everything.
The Gateway API with Lumen will have the union of all the possible routes of the microservices to attend and direct each one of the correct ways.
You must give the ability to redirect requests to the correct service, consuming them through HTTP with Lumen and GuzzleHttp.
It is necessary to prepare and build the necessary structures that will allow particularizing the way in which the Gateway can consume the other Lumen microservices.
Consume the authors' service to obtain and return the complete list of authors. Everything must work through the Gateway Controllers.
Consume the authors' service to create and return a new author, using the controllers and services of the Gateway with Lumen.
It consumes the microservice of Lumen authors to obtain and return an author, from a received identifier.
Obtain and edit an existing author through the microservice of authors and everything from the Gateway.
Remove an author instance using the microservice from the Lumen Gateway.
From the operations already implemented for authors, it is time to do something similar for the books, using the respective micro-service from Lumen.
The Gateway API will be in charge of verifying that an author exists before allowing creating a book.
Like all other microservices, the Gateway is also susceptible to errors and must be controlled, in addition to handling the errors of the architecture's internal services.
Add Passport as a dependency, which will allow you to easily implement the security for the Gateway API through OAuth2.
You must add some components and execute some commands to allow the Gateway to protect and provide access to protected routes of the microservices architecture.
Once you have everything installed and ready, you can protect all Gateway routes, so that they require a valid access token. Using Lumen Passport of course.
Now that your routes are protected, you must know how to obtain a valid access token that allows you to access routes protected with Lumen Passport.
Now, the Gateway must be able to identify itself in front of other microservices of the architecture so that these then allow access, using secret keys.
Now that the Gateway can authenticate itself, it is time to avoid direct access to the author service so that only the Gateway can make requests to it.
In the same way you did with the microservice for authors, it is time to proceed with the books one to avoid direct access to it.
First of all, you need a table to store users. To do this, you will use a migration taken from Laravel.
Now that you have where to store users, it is time to add all possible actions to users. Create, display, update and delete users.
Now that you have different actions for users, it is necessary to solve some important details when creating a user.
It is time to see how to create a user and use their credentials to obtain an access token.
Now that you can have an access token associated with a user, you can protect the routes properly and also identify the user behind a received token.
Now I share some comments and recommendations to continue with confidence the process with microservices and service-oriented architectures with Lumen.
There is nothing left but to thank you and congratulate you for taking the course and reaching the end.
Implement from scratch a complete service-oriented architecture with PHP, using Lumen by Laravel.
Lumen is a PHP microframework based on Laravel (a PHP framework), which makes it ideal to implement microservices along with rapid and light systems.
During this course, I will show you the whole process to implement a service-oriented architecture with PHP and using Lumen; implementing a set of microservices and its interactions. Build the entire security and interaction systems between each microservice. All of that using PHP with Lumen.
So, do not wait any more, and enroll now :)
Why should you take this course?
Because it gives you a detailed view, as in no other course, of a service-oriented architecture that is fully functional and secured using PHP and Lumen.
Because you will be able and confident enough to implement your microservices and architectures using Lumen and PHP.
Because it not only shows you the benefits of microservices and their architectures but also shows you how to solve the challenges that microservices represents
Because it shows you how to secure all the microservices in the architecture and control the access to them
What will you be able to do at the end of the course?
In general, you will be able to implement any microservices architecture you need using PHP and Lumen. You will have a clear idea of how to implement each microservice with Lumen, as well as how the interaction between each of these microservices should be structured, how to build a complete security layer that protects and restricts access to each microservice in the architecture using OAuth2 with Lumen/Laravel Passport along with authenticate users and use different grant types of OAuth2.
You will feel confident to take your path and carry out your projects with all the microservices and components you want with PHP and Lumen.
What will you learn exactly?
Create projects in Lumen by Laravel
Configure and use Lumen easily in your system without complex processes
Use Lumen properly for its ideal purpose: the microservices
Build a fully functional service-oriented architecture from scratch
Use OAuth2 to protect access to your architecture, through Lumen/Laravel Passport
Install and adapt Laravel Passport to Lumen projects
Create access tokens associated with users to handle users data and authorization flows
Authenticate users credentials and restrict access to only valid users if needed
Authorize and use different kinds of access tokens to restrict the action over your resources
Create a complete system of interaction between microservices through HTTP requests with GuzzleHTTP from Lumen
Build fully functional and adequate services with Lumen
Returns and builds standardized JSON responses with Lumen
Separate the components of a service-oriented architecture appropriately
Handle errors and exceptions appropriately to ensure the consistency of the entire architecture
Build and implement, correctly, an API Gateway for your architecture
Centralize the consumption of your service-oriented architecture through an API Gateway with Lumen
And a lot much more. You will have access for life to each class that makes up the course and those that will come later. You also have direct access to me, so you can ask me questions and solve all your doubts.
Do not wait any longer, cheer up and join the course and give free rein to all the possibilities that Lumen offers with a service-oriented architecture.