Laravel 5.8 New Login Register System
Laravel 07-Oct-2020

Laravel 5.8 New Login Register System

Laravel login authentication register with example. In this laravel 5.8 default login authentication system, we will study about how to create laravel login authentication and register with example .Step by Step Guide to Building Your First laravel login authentication and register  Laravel 5.8 Application. A complete step by step complete guide.
 

Laravel 5.8 is recently release with great new features and improvents. We are going to show you how to create login and register auth system using one command name php artisan make:auth. This command will create some default views blade, controllers and routes. that is help to login and register a users.


Contents

  • First Install Laravel Fresh Project
  • Configuration changes in .env file
  • Generate Laravel Application Key
  • Database Migration
  • Create a Login Authentication  Laravel
  • Now Run the created  project 
  • Conclusion

1. First Install Laravel Fresh Project

First we have install laravel new setup in our system . where we installed php. open your terminal and type the below command :

composer create-project --prefer-dist laravel/laravel firstApp

Note : In this command firstApp is project folder name

If your using ubuntu machine. open your terminal and go to your project root directory and type the command in command prompt :

sudo chmod  -R 777 storage

sudo chmod  -R 777 bootstrap

2. Configuration changes in .env file

After successfully installed the laravel application, in the next step is  configuration .evn file. Let’s open .env file and setup database credential like database name , database user name , databasse password and host.

laravel login .env

Laravel .env

3. Generate Laravel Application Key

Configuration compeleted successfully of .evn file , Let’s open the command prompt and generate laravel application key using this given below command.

php artisan key:generate

4. Database Migration

Before you run php artisan migrate command.

Go to the app/providers/AppServiceProvider.php and put the two line of code inside a boot method

Use Schema; 

public function boot() { 

 Schema::defaultStringLength(191); 

 } 

Use this below command , it will automatic created tables in your database. A new migration file is created by you. You update the code in that migration, run php artisan migrate again, and you have a new column in your table.

php artisan migrate
php artisan migrate

php artisan migrate

5. Laravel Authentication

This command will create routes , controllers and views  files for Laravel Login Authentication and registration. It means provide a basic laravel login authentication and registration Complete system. Let’s open the command propmt and type the below command.

php artisan make:auth
php artisan make:auth

php artisan make auth

6. Now run the created project

In this step to use the php artisan serve command .it will start your server locally

php artisan serve

If you want to run the project diffrent port so use this command

php artisan serve --port=8080 

laravel authentication is successfully completed, Now Go to the browser and hit the

URL : http://localhost:8000/login

If you not run php artisan server command , direct go to your browser and type the url

URL : http://localhost/firstApp/public/

On your browser see this :

laravel login

Laravel 5.8 Register Screen :

laravel register

7. Conclusion

We have successfully install laravel 5.8 fresh new application and also created laravel login authentication.