Codeigniter 4: Episode 1 Installation Using Composer and Download

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys and welcome to this first uh tutorial video on how to install uh download and install codeigniter platform uh we'll be working coordinator 4 for this particular episode now in this episode i'm going to be showing you how i'm going to show you how to download coordinator 4 and run it this set it up basically for running and we'll see from when we download it the two different ways of downloading it using composer and just using the native zip file and then from that we can we can be able to to at least this uh run it and see how that works now this this uh tutorial assumes that you have already downloaded and installed php in your server in your system and because i'll be using zump with php version 8. you can still use xampp with php version 7. you can use mum.1 whichever is applicable to your case my installation also assumes that you you've already installed composer the dependency management software but if you need if you if you need me to do a video on it you can leave a comment and i'll be able to do a video on how to install xampp on your platform how to install uh compose on your platform and and how to use compose and jump um at least for for the installation in this video i'm going to show you how to download uh codeigniter and i'm going to show you how to use coding later but is to set it up and start using the php spark using the spark server for at least running the service so first you will open your browser and you will go to coordinator.com and you will see a page that looks like this you will have there are links to the manual to the download version uh in my case i'll click on download the top bar you can see we have download now we have different versions that you can download um you have codeigniter 4 which is what you're going to be using and it supports php version 7.3 and above coordinator 3 which supports php version 5.6 and above so in this case you realize that quality is backward compatible we will start by first installing it using the download the download function so i will click on download sorry seems like it's having issues um if that link doesn't work for you you can always go back to the home page and click on this download which will give you a link to the releases i'm going to be downloading 4.1.4 which is uh as at the time of this recording the latest and i will click on the source file so you can choose whether you want a zip file or a tar file depending on the installation i think you can choose whichever is applicable to you in my case i'm using the zip file i am going to save this so this is going to be saved in the downloads folder i'm going to drag it down to the uh desktop i'll just bring it here and i will extract it so i'm using an archiver to extract it and the moment you extract it then you will it will pop up um so here it is okay let me just clean the desktop [Music] so that we can find it here it is okay all right so um i'm going to rename it to [Music] i can give it a name ci now i can open a terminal so i'll right click on it and open a terminal of this folder if you're on windows ecosystem then you can do the cd you navigate so you can open command prompt you do cd forward slash navigate to your desktop then you never get inside the folder and to run it uh in this case i'm assuming that the apache server is running so as you can see my server is up and running i apache is running my sql service is running uh so i'm using the control panel for zump then in this terminal window or the command prompt i will simply type php spark sub spark is their server environment uh sort of similar to what laravel had in uh artisan so in this case uh sparkler will allow us to run and you can see that it starts with the php version 8 that i have installed in my development server and the url that we'll be accessing is localhost port 8080. so you can copy that go back to the browser open a new tab and paste it and you should be able to see this installation file or this coordinator interface that is working because you can navigate you get the documentation which is online uh and it gives you a bit more information as to how you can use it you can also open this file in in my case i'll be using visual studio code so i'm going to open the folder on the desktop so i'm going to open the folder on the desktop ci and you will see that it has yes i need to trust all items that is fine you notice that it has a composer a composer.json file which allows you to set the dependencies on what you need to have in this installation so in this case you can see it has requires php 7.3 and above or eight we have an env file which allows us to set the configurations for our server so the env files you can set it for if your database is called test then you can uncomment out these lines and set up the different services so we have the spark environment here which allows us now to run the service itself and it opens allows us to open this in in the environment uh this is it has a git igno file because this is a gate the service was hosted on git at some point and therefore it allows us to have it now the index.php file which is the first page that is going to be loaded is going to be in the public folder and they measure that this is for purposes of security we have the htaccess file uh which is um our moderate file that allows us to be able to remove the trading slashes so for example if you say uh localhost forward slash the folder name for something i don't want to put the index.php every time then this allows you to rewrite the elements uh robot.txt is simply to allow us to index this on google google search so that allows us to do that now we have the system folder which uh contains the details about uh the core files of this is of the coordinate application and then we have the app which will now which is now where you'll be storing your files so you have controllers where you'll have the best controller which simply does the redirection then you have the home controller so the first controller that you have here which allowed us to run this file is the home controller we have database so you can it supports migration so in case you want to maybe define some few sql files that you or sql table that you may want to migrate from one computer to another then you have my questions for that if you want to have some initial value so for example in the roles table if you want to have uh the different user roles or the different administrator or an inbuilt administrator then you can have them as a cd value and you can randomize the seed as in this case you can have some initial values that the system would be rolled out with uh of interest again to us is the models so the models here will keep track of any connection to the database so this is you'll be keeping your models where you'll define your database elements such as uh let's say you have a user user table then you'll have a user model that will be you know allow you to insert data to the user table and get data from the user table and and that essentially with an mvc approach we normally separate the model the view and the controller so the model is database connection the view is in charge of the view is in charge of the interface and the controller does the you know the the connection between the model and the view so it allows you to do that communication um then under views we have uh the first page here is the welcome page which is a simple html file uh of course it has a php extension because um the the the framework is a php framework but then uh in this file you can see that uh we have all the components and you can see we have the details um if you look at it we have the section that has the about this page so you will be developing you'll be defining your views in this part your models in the models folder and the controllers in the controllers folder if you need to add any helpers if you need to have any different languages that you want to to to encode the website in for example if you want to convert it into spanish then you can have uh the different language files here if you have any additional libraries such as mpdf and such whichever you you may need or if you are defining your own library that you will use for example m-pesa then you can put it here um yeah so this is just a brief introduction to [Music] the first way of installation the second way of installation is where you will use composer so let me just create a new folder here and say leave it as untitled and i'll i want to navigate here inside it so i create a new terminal and folder and i'll be using the composer to i'll be using composer to uh to install this so i have installed composer system width so this can say composer create project um codeigniter and and by the way the same control the same command is here where if you are using the composer installation then you don't have to to remember the the commands so in this case it's called ignite for forward slash the project name so i can say my project is called test by doing that it will simply create okay sorry ah sorry uh supposed to be upstata my uh app starter then you can give the folder name yeah and what it will do it will install for you and it will extract the files for you and the name of the file is going to be test so in case you have tried it fast and it doesn't accept then it means that so when i open this it means that you need to change the name of the folder and again if you look at it it has exact same folder structure as what we had in it and to run it you can simply uh right click on it open a new terminal there so you'll navigate to it the same way we run it the first time with the other folder we can say php spark solve and again he will get the development server on port 8080 which will give us so if i say local post uh localhost port 88 will give us a similar installation to what we had initially yeah so i think um yeah so that is it for this first tutorial if you want me to do [Music] a tutorial on where on how to install uh zump for different installations please let me know if you want me to do how to install composer then please let me know and i will be able to to do so i will be in the next episode i'll be taking you through how do we set up our first file in codeigniter and maybe create a simple simple page in coordinate and see how that runs till next time if you enjoyed the video please leave a like subscribe for more content and till next time bye
Info
Channel: Unhinged GT
Views: 519
Rating: undefined out of 5
Keywords: codeigniter, tutorials
Id: rbHF3wK3jAw
Channel Id: undefined
Length: 13min 40sec (820 seconds)
Published: Sat Nov 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.