📜  laravel install ui bootstrap with auth - Shell-Bash (1)

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

Laravel Install UI Bootstrap with Auth - Shell-Bash

Introduction

In this guide, we will walk you through the process of installing the Laravel UI package with Bootstrap and authentication support. Laravel UI provides a simple way to scaffold user interfaces for authentication systems in Laravel.

Prerequisites

Before you begin, ensure that you have the following installed:

  • Composer
  • Laravel
  • Node.js and npm
Installation Steps

Follow the steps below to install Laravel UI with Bootstrap and authentication:

  1. Create a new Laravel project using the composer command:
composer create-project --prefer-dist laravel/laravel project-name
  1. Navigate to the project directory:
cd project-name
  1. Install the Laravel UI package via Composer:
composer require laravel/ui
  1. Generate the scaffolding for Bootstrap in your Laravel project:
php artisan ui bootstrap --auth
  1. Install the NPM dependencies:
npm install && npm run dev
  1. Compile the assets:
npm run dev
  1. Run the development server:
php artisan serve

Once the development server is running, you will be able to access your Laravel application with Bootstrap and authentication enabled.

Additional Configuration
Customizing the UI

You can customize the Bootstrap UI by modifying the views and CSS files located in the resources/views/auth and resources/sass directories respectively.

Testing the Authentication

To test the authentication system, navigate to the registration and login routes provided by Laravel. You can access these routes in your browser at the following URLs:

  • Registration: http://localhost:8000/register
  • Login: http://localhost:8000/login
Conclusion

By following this guide, you have successfully installed Laravel UI with Bootstrap and authentication support in your Laravel project. You can now start building your application with a pre-built user interface and a fully-functional authentication system.