Al utilizar el sitio web AlfaVila.com, acepta el uso de cookies para mejorar el nivel de servicio.

Laravel Login and Registration – Breeze, Fortify, Jetstream, Passport, Sanctum

1. (Laravel 6) Laravel UI – legacy, >> Breeze
Install
composer require laravel/ui
// Select one:
php artisan ui bootstrap –auth
php artisan ui vue –auth
php artisan ui react –auth
php artisan migrate
npm i && npm run dev

1a. (Laravel 6) Laravel Passport <> Sanctum
Laravel Passport provides a full OAuth2 server implementation for your Laravel application in a matter of minutes. Passport is built on top of the League OAuth2 server that is maintained by Andy Millington and Simon Hamp.

Install
composer require laravel/passport
php artisan migrate
php artisan passport:install

2. (Laravel 8) Laravel Jetstream
Laravel Jetstream is a beautifully designed application starter kit for Laravel and provides the perfect starting point for your next Laravel application. Jetstream provides the implementation for your application's login, registration, email verification, two-factor authentication, session management, API via Laravel Sanctum, and optional team management features.
Jetstream is designed using Tailwind CSS and offers your choice of Livewire or Inertia scaffolding. Laravel Jetstream uses Laravel Sanctum to provide a simple token-based API.

Install
composer require laravel/jetstream
For Blade: php artisan jetstream:install livewire
For Vue: php artisan jetstream:install inertia
php artisan migrate
npm install && npm run dev

2a. (Laravel 8) Laravel Sanctum <> Passport
Laravel Sanctum provides a featherweight authentication system for SPAs (single page applications), mobile applications, and simple, token based APIs. Sanctum allows each user of your application to generate multiple API tokens for their account. These tokens may be granted abilities / scopes which specify which actions the tokens are allowed to perform.
It is perfectly fine to use Sanctum only for API token authentication or only for SPA authentication. Just because you use Sanctum does not mean you are required to use both features it offers.

Install
composer require laravel/sanctum
php artisan vendor:publish –provider="Laravel\\Sanctum\\SanctumServiceProvider"
php artisan migrate

2b. (Laravel 8) Laravel Fortify == Breeze whitout views
Laravel Fortify is a frontend agnostic authentication backend implementation for Laravel. Fortify registers the routes and controllers needed to implement all of Laravel's authentication features, including login, registration, password reset, email verification, and more. After installing Fortify, you may run the route:list Artisan command to see the routes that Fortify has registered.
Since Fortify does not provide its own user interface, it is meant to be paired with your own user interface which makes requests to the routes it registers. We will discuss exactly how to make requests to these routes in the remainder of this documentation.

Install
composer require laravel/fortify
php artisan vendor:publish –provider="Laravel\\Fortify\\FortifyServiceProvider"
php artisan migrate

———-

3. (Laravel 9) Laravel Breeze
Laravel Breeze is a minimal, simple implementation of all of Laravel's authentication features, including login, registration, password reset, email verification, and password confirmation. In addition, Breeze includes a simple "profile" page where the user may update their name, email address, and password.
Laravel Breeze's default view layer is made up of simple Blade templates styled with Tailwind CSS. Or, Breeze can scaffold your application using Vue or React and Inertia.

Install
composer require laravel/breeze –dev
php artisan breeze:install
php artisan migrate
npm install && npm run dev

——–

Laravel Login and Registration – Breeze, Fortify, Jetstream, Passport, Sanctum

Comparte este post

¿Cómo funciona Scrumban?

La metodología Scrumban toma características tanto de la estrategia Scrum como de Kanban. El proceso