In this article, we'll see how to create a bootstrap login and register in laravel 10. Here, we'll use laravel auth scaffolding to create a login and register. In this comprehensive guide, I'll take you through the entire process of setting up user authentication in Laravel 10.
Let's dive into laravel 10 login authentication, how to create login and registration in laravel, and laravel 10 auth scaffolding.
If you haven't already, install Laravel 10 by running the following command.
composer create-project laravel/laravel example-app
Now, we will create an auth scaffold command to create a login, register, and dashboard.
composer require laravel/ui
Generate basic scaffolding and login and registration using Bootstrap 5.
php artisan ui bootstrap
OR
php artisan ui bootstrap --auth
Generate basic scaffolding and login and registration for Vue.
php artisan ui vue
OR
php artisan ui vue --auth
Generate basic scaffolding and login and registration for react.
php artisan ui react
OR
php artisan ui react --auth
Then, configure the database details in the .env file.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=DATABASE NAME
DB_USERNAME=DATABASE USERNAME
DB_PASSWORD=DATABASE PASSWORD
Run the following command to install npm and compile CSS and js files.
npm install && npm run dev
Then, we will migrate the table using the following command.
php artisan migrate
Now our Laravel 10 Authentication is ready to use.
php artisan serve
You might also like:
- Read Also: How to Login with OTP in Laravel 10 Example
- Read Also: How to Create AJAX Pagination in Laravel 10
- Read Also: How to Create CRUD with Image Upload in Laravel 10
- Read Also: How To Create CRUD Operation In Laravel 10 Livewire