PHPackages                             kwhorne/wirement-breeze - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. kwhorne/wirement-breeze

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

kwhorne/wirement-breeze
=======================

A custom package for Filament with login flow, profile and teams support.

1.0.11(10mo ago)111MITPHPPHP ^8.2|^8.3|^8.4

Since Aug 26Pushed 10mo agoCompare

[ Source](https://github.com/kwhorne/wirement-breeze)[ Packagist](https://packagist.org/packages/kwhorne/wirement-breeze)[ Docs](https://github.com/kwhorne/wirement-breeze)[ RSS](/packages/kwhorne-wirement-breeze/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (10)Versions (12)Used By (0)

Wirement Breeze
===============

[](#wirement-breeze)

Enhanced security for Filament v4+ Panels
-----------------------------------------

[](#enhanced-security-for-filament-v4-panels)

[![Latest Version on Packagist](https://camo.githubusercontent.com/321618ea62fb861f224e21ffee5cc679e903d3070be4c2230181424e46afe89d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b77686f726e652f776972656d656e742d627265657a652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kwhorne/wirement-breeze)[![Total Downloads](https://camo.githubusercontent.com/f1a18af00735e879ba3a222cfae9aaac91de8b1e7c1c5e9278a19f61857e6544/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b77686f726e652f776972656d656e742d627265657a652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kwhorne/wirement-breeze)[![License](https://camo.githubusercontent.com/cf8fa7b95e164286d53fab6d2f4ad027cd4e04729ed3e585ba8bf0108c5d07d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b77686f726e652f776972656d656e742d627265657a652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kwhorne/wirement-breeze)

**Wirement Breeze** is a complete security package for Filament v4+ panels. The package includes a customizable "My Profile" page with personal information and avatar support, password updates, two-factor authentication, and Sanctum token management.

### ✨ Key Features

[](#-key-features)

- 🔐 **Two-factor authentication** with recovery codes
- 👤 **My Profile page** with avatar support
- 🔑 **Password updates** with customizable validation rules
- 🛡️ **Password confirmation** for sensitive actions
- 🎫 **Sanctum token management**
- 🌐 **Browser session management**
- ⚡ **Quick installation** - ready in minutes!

### 🚀 Compatibility

[](#-compatibility)

- **Laravel 12+** (with full support for Laravel 12 features)
- **Filament v4.0+** (optimized for latest Filament features)
- **TailwindCSS v4.0+** (compatible with modern CSS features)
- **PHP 8.2+** (supports PHP 8.2, 8.3, and 8.4)

📸 Features
----------

[](#-features)

### My Profile - Personal information with avatar support

[](#my-profile---personal-information-with-avatar-support)

### Password updates with customizable validation rules

[](#password-updates-with-customizable-validation-rules)

### Protected actions with password confirmation

[](#protected-actions-with-password-confirmation)

### Two-factor authentication with recovery codes

[](#two-factor-authentication-with-recovery-codes)

### Required two-factor authentication

[](#required-two-factor-authentication)

### Sanctum token management

[](#sanctum-token-management)

### Browser session management

[](#browser-session-management)

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require kwhorne/wirement-breeze
php artisan wirement-breeze:install
```

### Publish views (optional)

[](#publish-views-optional)

```
php artisan vendor:publish --tag="wirement-breeze-views"
```

### Publish translations (optional)

[](#publish-translations-optional)

```
php artisan vendor:publish --tag="wirement-breeze-translations"
```

⚙️ Usage &amp; Configuration
----------------------------

[](#️-usage--configuration)

You must enable Wirement Breez by adding the class to your Filament Panel's `plugin()` or `plugins([])` method:

```
use Kwhorne\WirementBreeze\WirementBreezeCore;

class CustomersPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ...
            ->plugin(
                WirementBreezeCore::make()
            )
    }
}
```

### Update auth guard

[](#update-auth-guard)

Wirement Breez will use the `authGuard` set on the Filament Panel that you create. You may update the authGuard as you please:

```
use Kwhorne\WirementBreeze\WirementBreezeCore;

class CustomersPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ...
            ->authGuard('customers')
            ->plugin(
                WirementBreezeCore::make()
            )
    }
}
```

**NOTE:** you must ensure that the model used in your Guard extends the Authenticatable class.

### My Profile

[](#my-profile)

Enable the My Profile page with configuration options.

**NOTE:** if you are using avatars,

```
WirementBreezeCore::make()
    ->myProfile(
        shouldRegisterUserMenu: true, // Sets the 'account' link in the panel User Menu (default = true)
        userMenuLabel: 'My Profile', // Customizes the 'account' link label in the panel User Menu (default = null)
        shouldRegisterNavigation: false, // Adds a main navigation item for the My Profile page (default = false)
        navigationGroup: 'Settings', // Sets the navigation group for the My Profile page (default = null)
        hasAvatars: false, // Enables the avatar upload form component (default = false)
        slug: 'my-profile' // Sets the slug for the profile page (default = 'my-profile')
    )
```

#### Custom My Profile page class

[](#custom-my-profile-page-class)

You can also use a custom My Profile page class by extending the default one, and registering it with the plugin.

```
WirementBreezeCore::make()
    ->myProfile()
    ->customMyProfilePage(AccountSettingsPage::class),
```

#### Using avatars in your Panel

[](#using-avatars-in-your-panel)

The instructions for using custom avatars is found in the Filament v4 docs under [Setting up user avatars](https://filamentphp.com/docs/4.x/panels/users#setting-up-user-avatars).

Here is a possible implementation using the example from the docs:

```
use Illuminate\Support\Facades\Storage;
use Filament\Models\Contracts\HasAvatar;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable implements FilamentUser, HasAvatar
{
    // ...

    public function getFilamentAvatarUrl(): ?string
    {
        return $this->avatar_url ? Storage::url($this->avatar_url) : null ;
    }
}
```

#### Customize the avatar upload component

[](#customize-the-avatar-upload-component)

```
use Filament\Schemas\Components\FileUpload;

WirementBreezeCore::make()
    ->avatarUploadComponent(fn($fileUpload) => $fileUpload->disableLabel())
    // OR, replace with your own component
    ->avatarUploadComponent(fn() => FileUpload::make('avatar_url')->disk('profile-photos'))
```

#### Add column to table

[](#add-column-to-table)

If you wish to have your own avatar, you need to create a column on the users table named `avatar_url`. It is recommended that you create a new migration for it, and add the column there:

```
php artisan make:migration add_avatar_url_column_to_users_table

```

```
