laravel9_authentication_using_jetstream

  • Laravel 9 jetstream được thiết kế bởi Tailwind CSS và họ cung cấp giàn giáo xác thực bằng cách sử dụng livewire và Inertia. Laravel jetstream cung cấp tính năng đăng nhập, đăng ký, xác minh email, xác thực hai yếu tố, quản lý phiên, API thông qua Laravel Sanctum và các tính năng quản lý nhóm có sẵn.
  • Laravel Livewire là một thư viện giúp đơn giản hóa việc xây dựng các giao diện hiện đại, phản ứng, động bằng cách sử dụng Laravel Blade, bộ điều khiển Laravel và xác thực Laravel.
  • Livewire cung cấp một cách để viết ajax của bạn bằng laravel blade, xác thực và tất cả, bạn có thể sử dụng như một khuôn khổ javascript. vì vậy chúng ta hãy xem bước dưới đây để tạo auth bằng laravel 9 livewire.

Laravel 9 Auth Scaffolding using Livewire Jetstream

1. Install Laravel 9

composer create-project laravel/laravel laravel9_authentication_using_jetstream
  • Install Jetstream:
composer require laravel/jetstream
  • Create Auth with Livewire:

php artisan jetstream:install livewire
OR
php artisan jetstream:install livewire --teams
  • Dùng node js package (Cài Node.js)
npm install
  • run package
npm run dev
  • run create database table
php artisan migrate

Bây giờ, bạn có thể chạy và kiểm tra

Laravel 9 Auth Scaffolding using Inertia Jetstream

1. Install Laravel 9

composer create-project laravel/laravel laravel9_authentication_using_jetstream

2. Install Jetstream:

composer require laravel/jetstream  

-Create Auth with Inertia:

php artisan jetstream:install inertia
OR
php artisan jetstream:install inertia --teams 
  • Dùng node js package
npm install
  • run package
npm run dev
  • run create database table
php artisan migrate

Laravel 9 Jetstream Features

Laravel 9 Jetstream cung cấp tất cả các tính năng mới đều có thể cấu hình được. bạn có thể thấy có tệp cấu hình fortify.php và tệp jetstream.php nơi bạn có thể bật và tắt tùy chọn cho tính năng đó:

  • Vào config / fortify.php

....
  
'features' => [
        Features::registration(),
        Features::resetPasswords(),
        Features::emailVerification(),
        Features::updateProfileInformation(),
        Features::updatePasswords(),
        Features::twoFactorAuthentication(),
    ],
...
  • Vào config/jetstream.php

....
  
'features' => [
        Features::profilePhotos(),
        Features::api(),
        Features::teams(),
    ],
...

Run Laravel App:

php artisan serve

Container Container Container Container Container Container Container

GitHub

View Github