📜  laravel ui auth - PHP (1)

📅  最后修改于: 2023-12-03 14:43:45.998000             🧑  作者: Mango

Laravel UI Auth - PHP

Laravel UI Auth is a package available in Laravel that provides a simple way to scaffold authentication functionality into a new Laravel project. This package can be used to generate boilerplate login, registration, forgot password, and reset password pages with minimal effort.

Installation

To install Laravel UI Auth, you can require it with Composer:

composer require laravel/ui:^3.0

After installing the package, you can use the ui command to generate the desired authentication scaffold.

Usage

To generate the authentication scaffold, you can use one of the following commands:

# Generate an authentication scaffold with Bootstrap views
php artisan ui bootstrap --auth

# Generate an authentication scaffold with Vue.js + Vue Router + Tailwind CSS
php artisan ui vue --auth

# Generate an authentication scaffold with React + React Router + Tailwind CSS
php artisan ui react --auth

The --auth option tells Laravel to scaffold the authentication functionality.

Customization

If you want to customize the generated authentication views, you can publish them to your resources/views/auth directory with the following command:

php artisan vendor:publish --tag=laravel-ui-auth

After publishing the views, you can modify them to fit your needs.

Conclusion

Laravel UI Auth is a useful package that simplifies the process of building authentication functionality into a new Laravel project. With just a few commands, you can generate boilerplate login, registration, forgot password, and reset password pages with minimal effort. If you need to customize the generated views, you can easily publish them and modify them to fit your needs.