Laravel 7/6 Auth Example | Laravel 7/6 Authentication Example

Laravel 7/6 Auth Example | Laravel 7/6 Authentication Example

Laravel 7/6 remove PHP artisan make auth command, This tutorial shows you which command used instead of make: auth. Generally, PHP makes: auth command generated default views like login, registration, forget the password, reset password and verify email.

You may have noticed, after installing a fresh Laravel application that the make: auth command no longer exists. So let’s see how you can easily generating auth scaffolding in Laravel.

First of all, you must know about Laravel UI.

Laravel UI

Laravel UI is a new first-party package that extracts the UI portion of a Laravel project into a separate laravel/ui package. The separate package enables the Laravel team to iterate on the UI package separately from the main Laravel codebase.

You can install the laravel/ui package via composer:

laravel new my-app
composer require laravel/ui

Once you install the laravel / UI package, you have some commands available to generate the UI code, including authorization.

php artisan ui --help

The laravel/ui package provides a command for generating views for VUE, React and Bootstrap.

Here are a few examples:

php artisan ui vue
php artisan ui react
php artisan ui bootstrap

If you want to generate the auth scaffolding at the same time:

php artisan ui vue --auth
php artisan ui react --auth
php artisan ui bootstrap --auth

The ui:auth Command

In addition to the new UI command, the larva / UI package comes with another command to generate scaffolding:

php artisan ui:auth

If you run the ui: auth command, it will generate the organic root, HomeController, oral view, and app.blade.php layout files.

If you want to generate only views use the below command:

php artisan ui:auth --views

Now you need to run the below command for installing dependencies:

npm install
npm run dev

Know More – Make Auth

To learn more about the authentication and new UI package, check out the official Authentication Documentation.

You may like

  1. Php Artisan Serve Not Working Properly – Laravel Command
  2. Laravel Clear Cache Using Artisan Command CLI
  3. Laravel 6 Artisan Console Command Cheat Sheet ( List )
  4. Check Laravel Version Command-Line (cmd) and File
  5. How to Create a Controller And Model Laravel 6 Using cmd
  6. Laravel create and use middleware command
  7. Laravel clear cache shared hosting using artisan command

Leave a Reply

Your email address will not be published. Required fields are marked *