[PT 1] Creating a mini LMS (learning management system) in Laravel

Welcome back dudes, its time for another show again, you know I have always been a fan of raw PHP without frameworks, but when I tested the working power of laravel, I was really swept off my feet (sorry if my grammar is a little bit bad), Ok now back to what we need to discuss here, actually this was meant to be a long post, but for the purpose of simplicity, I’ll be shortening the tutorial.

A Learning management system is actually a website where one can register and log in and also have the time to access the courses taught on the website, and after which he or she logs off, and comes back again anytime the spirit leads.

Now in this our learning management system, we are just going to keep it so simple by creating just simple files, actually this tutorial is an insight into how laravel works.

- Advertisement -

Am not going to write the tests function for these codes, neither am I going to develop a full LMS here, am developing something very simple, now I think I have ranted enough, let’s get to work.

Installing Laravel and its Dependencies

Now if you are actually here for learning how to build an LMS, I supposed you should already have Laravel installed in your computer system, if not (although am not here to teach that, sorry buddy) just get to download composer and download composer, now I choose composer because it’s pretty easy to download laravel this way (or should I say its because that’s how I downloaded mine).

Now once you have a composer on your system, navigate to the directory which you want your laravel project to be, and on your command prompt use the codes below.

c:\users\metro\desktop> composer prefer --dist laravel/laravel {name_of_your_app}

Once you’re done, laravel should be installed, and you’ll see the folder/directory where you’ll be creating your laravel application, now we’re set to go, but remember, we need users to register and log in and perform some basic user functions.

User Registration and Login in Laravel

Now we have Laravel set up, and we need our users to register and log in, and also request for password recovery if the user forgets the password, now in laravel to create these function it uses a command which would create the User model file, and also several other files inside the  HTTP >  CONTROLLERS > AUTH folder as specified in the image below.

so on your command prompt use the command:

php artisan make:auth

This should create the needed files for your user registration, login, etc. functions, now what next? you can navigate to your local website  by using the command on your command prompt:

php artisan serve
This should display a message which should be
laravel development server started : <>

Now remember we created the authentication files using our PHP auth command, laravel automatically creates an auth folder and Model that renders all the needed pages for basic user registration and login (sorry for that long sentence, what I mean is that all those files are created automatically).

Now to see all those files for login and registration, navigate to the following URLs (uniform resource locator).

This should render the pages for you to see the wonders of laravel.

[Migrations] Creating Database and Tables in Laravel

So you almost wanted to register without a database when you checked the login page, and you were visited with an error, wow am sorry for that, nevertheless let’s get to work, creating databases and tables in laravel simply means creating migrations.

Now what do we need, we need a database named mini LMS and three tables named courses table, and the course user table, and the user’s table, actually the user’s table has been created for us when we first ran the auth command, so we are left with creating a database and two tables.
In the next post, I would explain how to do that. cheers.

Popular Categories

Popular Read

Samuel Jimhttps://foxstate.co/
Samuel Jim Nnamdi is the CTO of Foxstate, a platform that powers digital infrastructures for Real estate financing globally. He has over 8 years of Software Engineering and CyberSecurity expertise.

Related Articles


Please enter your comment!
Please enter your name here