vanthao03596/fortify-limitless

Fortify-driven Laravel UI replacement

Fund package maintenance!
vanthao03596

Installs: 18

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:SCSS

1.0.3 2021-07-31 14:05 UTC

This package is auto-updated.

Last update: 2022-04-29 01:42:38 UTC


README

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f466f72746966794c696d69746c6573732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d76616e7468616f3033353936253246666f72746966792d6c696d69746c657373267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d4c61726176656c2b466f72746966792b64726976656e2b7265706c6163656d656e742b746f2b7468652b4c61726176656c2b55492b7061636b616765266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667

Introduction

FortifyLimitless is an unopinionated authentication starter, powered by Laravel Fortify. This package can be used to start your project, or you can use the FortifyUi Preset Template which allows you to create your own preset that you can install with FortifyUI.

Installation

To get started, you'll need to install FortifyLimitless using Composer. This will install Laravel Fortify as well.

composer require vanthao03596/fortify-limitless

Next, you'll need to run the install command:

php artisan fortify-limitless

This command will publish FortifyLimitless's views, add the home route to web.php and add the FortifyLimitless service provider to your app/Providers directory. This will also publish the service provider and config file for Laravel Fortify. Lastly, it will register both service providers in the app.php config file, under the providers array.

That's it, you're all setup! For advanced setup and configuration options, keep reading!

Configuration

Edit FortifyUIServiceProvider.

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');
// });

To register all views at once, you can use this instead:

Fortify::viewPrefix('auth.');

Now, you should have all of the registered views required by Laravel Fortify, including basic layout and home views, as well as optional password confirmation, email verification and two-factor authentication views.

Features

By default, FortifyLimitless is setup to handle the basic authentication functions (Login, Register, Password Reset) provided by Laravel Fortify.

Email Verification

To enable the email verification feature, you'll need to visit the FortifyLimitless service provider and uncomment Fortify::verifyEmailView(), to register the view. Then, go to the fortify.php config file and make sure Features::emailVerification() is uncommented. Next, you'll want to update your User model to include the following:

use Illuminate\Contracts\Auth\MustVerifyEmail;

class User extends Authenticatable implements MustVerifyEmail
{
    ...

This allows you to attach the verified middleware to any of your routes, which is handled by the verify.blade.php file.

More info about this can be found here.

Password Confirmation

To enable the password confirmation feature, you'll need to visit the FortifyLimitless service provider and uncomment Fortify::confirmPasswordView(), to register the view. This allows you to attach the password.confirm middleware to any of your routes, which is handled by the password-confirm.blade.php file.

Two-Factor Authentication

To enable the two-factor authentication feature, you'll need to visit the FortifyLimitless service provider and uncomment Fortify::twoFactorChallengeView(), to register the view. Then, go to the fortify.php config file and make sure Features::twoFactorAuthentication is uncommented. Next, you'll want to update your User model to include the following:

use Laravel\Fortify\TwoFactorAuthenticatable;

class User extends Authenticatable
{
    use HasFactory, Notifiable, TwoFactorAuthenticatable;
    ...

That's it! Now, you can log into your application and enable or disable two-factor authentication.

Update User Password/Profile

To enable the ability to update user passwords and/or profile information, go to the fortify.php config file and make sure these features are uncommented:

Features::updateProfileInformation(),
Features::updatePasswords(),

FortifyLimitless Presets

FortifyLimitless encourges make your own presets, with your favorite frontend libraries and frameworks. To get started, visit the Fortify UI Preset Template repository, and click the "Use Template" button.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.