login and registration by command in laravel latest version

  • Share this:

Welcome guys, In this article Here, we will know how to create laravel login and register by cmd. Making simple and easy auth. if you have question about laravel auth then i will give simple example with solution.

Step 1: Building a New Application

You can ignore this step if you already have an application downloaded or else, run the following command to create a brand new laravel project.

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

After downloaded new application or already installed then moved our application directory run the following command or using your own method 

cd laravel-auth

Step 2: Configure Database Connection

In this type of project, we must give precedence to the database connection, generically it should be configured before getting started. Incorporate the following code in .env file with your database details.


Step 3: Run these commands on the terminal

composer require laravel/ui

composer require laravel/ui. Once the laravel/ui package has been installed, you may install the frontend scaffolding using the ui Artisan command in laravel Read more..

php artisan ui vue --auth

After install laravel/ui package install some dependencies for vue qr npm and build asset after command executed successfully !

npm install && npm run dev

Step 4: Migrate database

Laravel Migration is an essential feature in Laravel that allows you to create a table in your database. It allows you to modify and share the application's database schema. You can modify the table by adding a new column or deleting an existing column.

php artisan migrate

Step 5: Run Project & Testing 

php artisan serve

The Laravel PHP artisan serve command helps running applications on the PHP development server. As a developer, you can use Laravel artisan serve to develop and test various functions within the application. It also accepts two additional options. You can use the host for changing application's address and port

Login Page
Register Page