This blog is my way of me keeping track of the code that I write and documenting my thought processes. I like writing programs in Python and dabble in web development with some PHP here and there, nothing too advance. I enjoy playing around with Raspberry Pis and Arduino boards. Nothing major, just little projects like motion sensors and remote control LEDs. I am also working with a friend to help create his website and write content over at sliceofapi.co.uk. I won’t be updating the posts as I go so any changes that occur to software that may break my documented installation procedure won’t be updated, however, I am very happy to reply to people’s comments if they need help.
This post will just cover the contents of the view, home. It is a basic Bootstrap page with a navbar, header carousel and then there will eventually be some section beneath it. Continue reading CodeIgniter 4: The home page
Using the default root user for all your applications is fine as long as you don’t plan on exposing any of said applications to the internet or any other people that aren’t you. Adding extra users to your MySQL server is a piece of cake and I personally like to have a different user for each application that I have.
We now have our controller, but it doesn’t really do much other than throw an error about not being able to load the model or view. So let’s create us a model and view.
Countless times I have bought a CD and ripped it to my music collection only to find that it has no meta data. No artist, no album and worst off all no album art (I like my album art alright). There are countless tools out there that could do this for me but I wanted one that I had made because why not?
So now that we have a basic understanding of what the different parts of CodeIgniter are, we can get down to writing our first controller. The Home controller. This will be where the user lands when they visit our site.
CodeIgniter approaches web development with MVC in mind. MVC is a way of presenting data that keeps programme logic and presentation separate from each other. This means that there is little PHP scripting in your presentation pages, keeping them clean and focused on looks.