Skip to content

Commit 4a67ece

Browse files
committed
WIP
1 parent a70b666 commit 4a67ece

File tree

4 files changed

+34
-23
lines changed

4 files changed

+34
-23
lines changed

.phpunit.cache/test-results

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"pest_2.35.0","defects":[],"times":{"P\\Tests\\ExampleTest::__pest_evaluable_it_can_test":0.007}}
1+
{"version":"pest_2.35.0","defects":{"P\\Tests\\ExampleTest::__pest_evaluable_it_can_test":8},"times":{"P\\Tests\\ExampleTest::__pest_evaluable_it_can_test":0.007}}

README.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,29 @@ This plugin adds 2FA authentication to your Filament application. This package c
1515
- Extendable 2FA settings component for custom pages.
1616
- Automated test for all pages and components.
1717

18+
## Installation
19+
20+
Thank you for purchasing Filament Two Factor Authentication Plugin!
21+
22+
Below, you'll find documentation on installing this plugin. If you have any questions, find a bug, need support, or have
23+
a feature request, please don't hesitate to reach out to me at stephenjudesuccess@gmail.com.
24+
25+
You can install the package via composer:
26+
27+
```bash
28+
composer require stephenjude/filament-two-factor-authentication
29+
```
30+
31+
Install the plugin migration using:
32+
```bash
33+
php artisan filament-two-factor-authentication::install
34+
```
35+
36+
Optionally, you can publish the views using
37+
```bash
38+
php artisan vendor:publish --tag="filament-two-factor-authentication-views"
39+
```
40+
1841
## Usage
1942
First, ensure that your application's authenticatio model uses the `TwoFactorAuthenticatable` trait:
2043

@@ -48,27 +71,13 @@ public function panel(Panel $panel): Panel
4871
...
4972
```
5073

51-
## Installation
52-
53-
Thank you for purchasing Filament Two Factor Authentication Plugin!
54-
55-
Below, you'll find documentation on installing this plugin. If you have any questions, find a bug, need support, or have
56-
a feature request, please don't hesitate to reach out to me at stephenjudesuccess@gmail.com.
57-
58-
You can install the package via composer:
59-
60-
```bash
61-
composer require stephenjude/filament-two-factor-authentication
62-
```
63-
64-
Install the plugin migration using:
65-
```bash
66-
php artisan filament-two-factor-authentication::install
67-
```
74+
### Custom 2FA Settings Page
75+
If your application already has a user profile page, you can add a 2FA settings to your profile page view:
6876

69-
Optionally, you can publish the views using
70-
```bash
71-
php artisan vendor:publish --tag="filament-two-factor-authentication-views"
77+
```php
78+
<x-filament-panels::page>
79+
@livewire(\Stephenjude\FilamentTwoFactorAuthentication\Livewire\TwoFactorAuthentication::class)
80+
</x-filament-panels::page>
7281
```
7382

7483
## Screenshot

tests/ExampleTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

33
it('can test', function () {
4-
expect(true)->toBeTrue();
4+
$this->actingAs(User::factory()->create());
5+
6+
expect(filament()->auth()->check())->toBeTrue();
57
});

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public function getEnvironmentSetUp($app)
5252
{
5353
config()->set('database.default', 'testing');
5454

55-
5655
$migration = include __DIR__.'/../database/migrations/add_two_factor_authentication_columns.php.stub';
56+
5757
$migration->up();
5858

5959
}

0 commit comments

Comments
 (0)