‫All right, guys, so I will admit that in this section it's going to get a little hairy.
‫We're basically going to change the entire infrastructure of the project.
‫And we're going to be structuring it more like a real life application, similar to how Laravel is structured,
‫but of course much, much simpler.
‫So here's what I really want to tackle in this section.
‫First, the folder structure.
‫Basically, I want anything that is at the core of the project in a folder called framework.
‫And this is the framework of our application.
‫Things like the router, the database class, the validation class.
‫This stuff will go in this framework folder.
‫Then we'll have an app folder for our application.
‫And this will contain things like controllers, views, models if you have them etcetera.
‫We're also going to be using namespaces to make our code more organized and to avoid conflicts.
‫And this will also show us how to auto load our classes so we don't have to require them in every file.
‫And then controller classes.
‫We're going to be creating controller classes instead of just using single files.
‫This will make our code more organized as well.
‫And then finally we have our router refactor.
‫Since we're going to be using controller classes, we need the router to be able to handle this, because
‫right now it's just taking in an entire file as the controller.
‫Okay?
‫And I won't lie, this probably will be the most difficult part of the course, but we'll take it slow.
‫I'll try to explain everything the best as I can once we get this done.
‫Adding routes, working with the database, etcetera will be much easier.
‫All right, let's get into it.