What you will learn
In this course we will be learning how to build a simple framework with the authentication modules including:
Who is this course for
This course is for Intermediate users, who have a good understanding of the basic concept of PHP programming.
During this course we will also write unit tests using PHPUnit in order to ensure our components work the way they supposed to.
What do you need to know
To build our authentication component we will use Object Oriented PHP and some packages available via composer such as illuminate/http, illuminate/support, illuminate/database, nesbot/carbon, swiftmailer/swiftmailer etc.
To be able to complete this course, you have to have a good understanding of PHP fundamentals and be familiar with Object Oriented PHP. You will also need to have your virtual environment set up with either Apache or Nginx and MySQL / MariaDB database.
We will start by setting environment variables and begin work on our Session manager component.
In this episode we will code two session drivers - FileSession and ArraySession.
In this episode we will write unit tests our session component.
In this episode we will create the Kernel class, which will boot our application.
In this episode we will code the App class, which will be responsible for communication between the controller and the view.
In this episode we will create our super controller and the first controller responsible for handling 404 status.
Cookie component will be responsible for handling all cookie related interactions.
It's time to unit test our Cookie component.
Migrations allow us to store the schemas for our database table structures and easily re-use them whenever we need to move the site to a new host without necessity of copying sql files.
In this episode we will program the User model class using Eloquent (Laravel's Object Relational Mapper)
In this episode we will set up test environment to interact with database and write first couple of tests.
Continuing with the unit tests started in the previous episode.
All our authentication methods will be kept in the class called Guard.
It is now time to test our authentication component.
Validator class will be used to validate user submitted data using the web form.
To validate different data type we need to specify the rules, which our Validator component will make use of.
It's time to unit test our validator component.
First we need to code an abstract controller, which other controllers will inherit from.
Login controller is responsible for authenticating users.
Before we can authenticate the user we need to allow them to register.
To send notification we will code the Mail component.
In this episode we continue coding our Mail component.
Our Mail component makes use of the SwiftMailer and the SMTP transport.
In this episode we cover the activation of the account after the user has registered.
Forgot password module allows users to submit the reset password request.
In this episode we'll learn how to provide functionality that resets user's password.
In this episode we will do some refactoring.
A passionate web developer with over a decade experience in web industry.
Founder of SSD Tutorials, where he publishes his free and premium tutorials on how to build modern web applications.
Currently living and working in United Kingdom as a Senior Web Developer for one of the companies in West Sussex.