PHP code example of zacksmash / fortify-ui
1. Go to this page and download the library: Download zacksmash/fortify-ui library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zacksmash / fortify-ui example snippets
Fortify::loginView(function () {
return view('auth.login');
});
Fortify::registerView(function () {
return view('auth.register');
});
Fortify::requestPasswordResetLinkView(function () {
return view('auth.forgot-password');
});
Fortify::resetPasswordView(function ($request) {
return view('auth.reset-password', ['request' => $request]);
});
// Fortify::verifyEmailView(function () {
// return view('auth.verify-email');
// });
// Fortify::confirmPasswordView(function () {
// return view('auth.confirm-password');
// });
// Fortify::twoFactorChallengeView(function () {
// return view('auth.two-factor-challenge');
// });
Fortify::viewPrefix('auth.');
use Illuminate\Contracts\Auth\MustVerifyEmail;
class User extends Authenticatable implements MustVerifyEmail
{
...
use Laravel\Fortify\TwoFactorAuthenticatable;
class User extends Authenticatable
{
use HasFactory, Notifiable, TwoFactorAuthenticatable;
...
Features::updateProfileInformation(),
Features::updatePasswords(),
bash
php artisan fortify:ui
bash
php artisan fortify:ui --skip-provider