selfparameter which is the normal self that Python methods require. Controller methods can be looked at as "function based views" if you are coming from Django as they are simply methods inside a class and work in similar ways.
craftcommand tool. We can simply create a new file inside
app/http/controllers, name the class the same name as the file and then create a class with methods. We can also use the
craft controllercommand to do all of that for us which is:
DashboardController. By convention, Masonite expects that all controllers have their own file since it’s an extremely easy way to keep track of all your classes since the class name is the same name as the file. This is very opionated but you can obviously put this class wherever you like.
Dashboardcontroller located in
selfparameter is the normal python
selfobject which is just an instance of the current class as usual. Nothing special here.