How to Implement Authentication in Laravel 8 using Jetstream Package
In this article we will learn how to implement jetstream authentication in laravel 8 . As recently in september 12 , 2020 Laravel 8 is officially released . It brings us lots of new features to make the development more faster .
One of the interesting feature which is updated in Laravel 8 is it's default authentication . Laravel 8 now provides Authentication with a fresh scaffolding with the use of Jetstream Package . So let's see how to implement Laravel 8 Authentication Package .
Make sure you have already setup your " .env " file and connected to your database .
One of the interesting feature which is updated in Laravel 8 is it's default authentication . Laravel 8 now provides Authentication with a fresh scaffolding with the use of Jetstream Package . So let's see how to implement Laravel 8 Authentication Package .
Quick setup :
Use the following commands inside your project in terminal to install Jetstream Package and implement Laravel 8 Authentication in your Project .Make sure you have already setup your " .env " file and connected to your database .
composer require laravel/jetstream
php artisan jetstream:install livewire
npm install
npm run dev
php artisan migrate
Steps to Follow :
- Install a Project
- Setup Database
- Install Jetstream Package
Step 1 - Install Project :
First Install a Laravel project using the following command .composer create-project --prefer-dist laravel/laravel project-name
Step 2 - Setup Database :
The next step is to setup your " .env " file for connecting your database as shown below ..env :
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=test //Database Name DB_USERNAME=root //Database UserName DB_PASSWORD= //Database Password
Step 3 - Install Jetstream Package :
After setting up your project and Database configuration successfully , follow the following steps for Implementing Laravel 8 Authentication .
Now you need to migrate our database for creating required tables . Use the following command to migrate the tables .
That's it . Now you are ready to use Laravel 8 Authentication . Now simply use the following command to run the server .
composer require laravel/jetstream
php artisan jetstream:install livewire
npm install
npm run dev
Now you need to migrate our database for creating required tables . Use the following command to migrate the tables .
php artisan migrate
That's it . Now you are ready to use Laravel 8 Authentication . Now simply use the following command to run the server .
php artisan serve
Output :
Homepage :
Register Page :
login Page :
Dashboard :
Thank you for reading this article 😊
For any query do not hesitate to comment 💬