In the series of learning of laravel we are going to go through a series of Laravel tutorials which will make some unclear things clear for you and you will get to know why so many people really like Laravel Framework.My sole motive for this blog is to give you knowledge so that you can start building stuff with Laravel. This series is not going to be very exhaustive but will guide you how to make and deploy your Laravel Application. I have broken this series into two parts. Part-1 will cover some basic stuff like Checking some prerequisites and installing the application on your server along with that we are going to create basic Login Authentication here. So let’s start with the Part-1.
Laravel Tutorials For Beginners Step By Step Guide – Part 1
Step -1 Checking System Requirements
You have many development environment option to use with Laravel for example Valet, Homestead, Vagrant, MAMP, etc. but you have to check whether your local environment possess the following requirements or not .
- PHP >= 7.1.3
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Ctype PHP Extension
- JSON PHP Extension
If your server have the following then you have successfully completed the step-1 and now moving on to the second step
Step-2 Installing the Laravel
Generally speaking at this point we should be clear with what we are going to build and should have outlined the project aspects. But here now we are going to install a fresh copy of the laravel project to begin with. In order to install the Laravel , Open your command line prompt and go to the folder where you want to install the folder for example, In xampp you should go inside the htdocs and type the following command on the command prompt
composer global require "laravel/installer"
After this wait for some time and open the link of your folder on your system you should be seeing a screen like this.
You can find the detailed list of Laravel Documentation here :- Laravel Documentation
Step-3 Creating the Default Authentication System
Although you should be connected with the database in order to have the default authentication working. But nonetheless , you should type the following command in the command line prompt for authentication system to run
php artisan make:auth
This command will create the auth system in Laravel app And you will seeing the following screen
As you can already see the on the topmost right position the option to register and Login is now present. In order for its working create a database in the Phpmyadmin for example.
Read More :- How to Deploy your Laravel Project On Server
Step- 4 Create Database
Create a new database in the phpmyadmin and run the following command in the command prompt to run the migration
php artisan migrate
Some migration operations are destructive, which means they may cause you to lose data. In order to protect you from running these commands against your production database, you will be prompted for confirmation before the commands are executed. To force the commands to run without a prompt, use the
php artisan migrate --force
After this you can start registering and login process easily as this command will create the users table in the database which is necessary for the registration process and same table is used for the login purposes as well.
Well Congratulations now for completing the PART-1 of this series of Laravel Tutorials For Beginners . I hope you have now installed the app and its authentication is working fine.In the second part we are going to cover some deeper aspects of creating the this Laravel App which will include working with controller , routes and models.
I hope you have liked this article if you have any query you can just comment that below and we can discuss that in details. Cheers ! Happy Coding