Skip to content

Commit

Permalink
📚 Improve readme significantly
Browse files Browse the repository at this point in the history
The readme has been made a lot clearer and clearer. Clear installation instructions are now included and there's basically no need to refer to the FortifyUI GitHub page.
  • Loading branch information
roelreijneveld committed Nov 14, 2020
1 parent d24aca2 commit c83b939
Showing 1 changed file with 66 additions and 11 deletions.
77 changes: 66 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<a name="requirements"></a>
## 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)

<a name="installation"></a>

## 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.
<a name="2fa"></a>

## 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;
...
```

<a name="mail-verification"></a>

- 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.

<a name="password-confirmation"></a>

## 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.

<a name="update-user-profile-and-password"></a>

## 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
<p align="center"><img src="https://github.com/Proxeuse/fortify-tabler/raw/master/tabler-screenshot.png"></p>

## License
Expand Down

0 comments on commit c83b939

Please sign in to comment.