diff --git a/README.md b/README.md index 07e4d82..32410d3 100644 --- a/README.md +++ b/README.md @@ -2,36 +2,91 @@ # Introduction -**Tabler.io** is a framework based on Bootstrap. This repository is a Laravel Fortify UI preset which should be used in combination with [FortifyUI](https://github.com/zacksmash/fortify-ui). This preset includes the Tabler.io assets for [release 1.0.0-alpha.7](https://github.com/tabler/tabler/releases/tag/1.0.0-alpha.7). +Laravel 8 has a new and very efficient application scaffolding package called [Jetstream](https://jetstream.laravel.com), many users however do not want to learn a new framework (TailWind CSS). Luckily, the backend of Jetstream has been made available under the name of Fortify. Fortify is a headless authentication backend without any pre-configured frontend templates which is a disadvantage. [FortifyUI](https://github.com/zacksmash/fortify-ui) improves Fortify by adding that missing feature. -- [Requirements](#requirements) -- [Installation](#installation) +This package is a preset for FortifyUI, it brings ready-to-use and beautiful templates for the most important pages which include: login, registration, password reset pages and two factor authentication. The templates are based and build on the [Tabler.io](https://tabler.io) framework which is build with Bootstrap 5.0. - -## Requirements +This preset includes Tabler assets for [release 1.0.0-alpha.7](https://github.com/tabler/tabler/releases/tag/1.0.0-alpha.7). -This package requires Laravel Fortify and FortifyUI. Installing [*FortifyUI*](https://github.com/zacksmash/fortify-ui) will automatically install and configure Laravel Fortify for you, so you may start there. +- [Installation](#installation) +- [Two Factor Authentication](#2fa) +- [Mail Verification](#mail-verification) +- [Password Confirmation](#password-confirmation) +- [Update User Profile and Password](#update-user-profile-and-password) + ## Installation -To get started, you'll need to install **fortify-tabler** using Composer. +To get started, you'll need to have FortifyUI installed. Firstly, install it using composer: + +```bash +composer require zacksmash/fortify-ui +``` + +After the installation, run the install command. + +```bash +php artisan fortify-ui:install +``` + +After installing FortifyUI, you'll have to install **fortify-tabler**. Again using composer: ```bash composer require proxeuse/fortify-tabler ``` -Next, you'll need to run the install command: +Next, you'll need to run the install command. Please note the change from `fortify-ui:install` to `fortify-ui:tabler`. This command will publish **fortify-tabler's** views and resources to your project. ```bash php artisan fortify-ui:tabler ``` -This command will publish **fortify-tabler's** views and resources to your project. + + +## Two Factor Authentication + +For the 2FA to work, you'll need to perform some manual steps. Firstly, uncomment `Fortify::twoFactorChallengeView()` from your `/app/Providers/FortifyUIServiceProvider.php` file 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: + +```php +use Laravel\Fortify\TwoFactorAuthenticatable; + +class User extends Authenticatable +{ + use HasFactory, Notifiable, TwoFactorAuthenticatable; + ... +``` + + -- All `auth` views -- Other files... +## Mail Verification +To enable the email verification feature, you'll need to visit the FortifyUI service provider (`/app/Providers/FortifyUIServiceProvider.php`) 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: + +```php +use Illuminate\Contracts\Auth\MustVerifyEmail; + +class User extends Authenticatable implements MustVerifyEmail +{ + ... +``` +This allows you to attach the verified middleware to any of your routes. + + + +## Password Confirmation +To enable the password confirmation feature, you'll need to visit the FortifyUI service provider (`/app/Providers/FortifyUIServiceProvider.php`) and uncomment `Fortify::confirmPasswordView()`, to register the view. This allows you to attach the `password.confirm` middleware to any of your routes. + + + +## Update User Profile and Password +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: + +```php +Features::updateProfileInformation(), +Features::updatePasswords(), +``` +## Screenshot

## License