PHPackages                             adultdate/filament-breezy - 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. adultdate/filament-breezy

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

adultdate/filament-breezy
=========================

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

v3.0.5(5mo ago)00MITPHPPHP ^8.2|^8.3|^8.4

Since Jan 23Pushed 4mo agoCompare

[ Source](https://github.com/adultdate/filament-breezy)[ Packagist](https://packagist.org/packages/adultdate/filament-breezy)[ Docs](https://github.com/jeffgreco13/filament-breezy)[ RSS](/packages/adultdate-filament-breezy/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelogDependencies (16)Versions (130)Used By (0)

[![Filament Breezy cover art](./art/breezy-banner.png)](./art/breezy-banner.png)

Enhanced security for Filament v4+ Panels.
==========================================

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/c31fb220da08d29c46d1ea75abca792a8c73111953e81d30640c705cddfc34db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a656666677265636f31332f66696c616d656e742d627265657a792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffgreco13/filament-breezy)[![Total Downloads](https://camo.githubusercontent.com/a99c0d68b01ee29b570b9214be885b04ccb2d55616f36474d3b4f0b93f9bc7af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a656666677265636f31332f66696c616d656e742d627265657a792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffgreco13/filament-breezy)

Enhanced security features for Filament (v4) Panels. Includes a customizable My Profile page with personal info &amp; avatar support, update password, two factor authentication, and Sanctum token management. Installs in minutes!

Features &amp; Screenshots
--------------------------

[](#features--screenshots)

My Profile - Personal info with avatar support [![Screenshot of Profile with avatar support](./art/profile-with-avatar.png)](./art/profile-with-avatar.png)Update password with customizable validation rules [![Screenshot of Two Factor codes](./art/password-update.png)](./art/password-update.png)Protected sensitive actions with a password confirmation modal Action [![Screenshot of Password confirmation action](./art/actions-confirm-password.png)](./art/actions-confirm-password.png)Two factor authentication with recovery codes [![Screenshot of Two Factor codes](./art/2fa-confirm.png)](./art/2fa-confirm.png)Force the user to enable two factor authentication before they can use the app [![Screenshot of forcing two factor auth](./art/2fa-must-enable.png)](./art/2fa-must-enable.png)Create and manage Sanctum personal access tokens [![Screenshot of Sanctum token management](./art/sanctum-manage-tokens.png)](./art/sanctum-manage-tokens.png)[![Screenshot of Sanctum token management](./art/sanctum-create.png)](./art/sanctum-create.png)Manage active browser sessions and log out other sessions
[![Screenshot of Browser Sessions](./art/browser-sessions.png)](./art/browser-sessions.png)
[![Screenshot of Close Browser Sessions Confirmation](./art/close-browser-sessions-confirm-password.png)](./art/close-browser-sessions-confirm-password.png)

Installation
------------

[](#installation)

1. Install the package via composer and install

```
composer require jeffgreco13/filament-breezy
php artisan breezy:install
```

2. Add Breezy to your Filament Panel

Add Breezy to a panel by adding the class to your Filament Panel's `plugin()` or `plugins([])` method.

```
use Jeffgreco13\FilamentBreezy\BreezyCore;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            BreezyCore::make()
        ])
}
```

3. Integrate Tailwind classes

Filament recommends developers to [create a custom theme](https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme) to better support a plugin's additional Tailwind classes. After you have created your custom theme, add Breezy's views to your theme's `theme.css` file usually located in `resources/css/filament/admin/theme.css`:

```
@source '../../../../vendor/jeffgreco13/filament-breezy/resources/**/*';
```

4. Optionally, you can publish the views

```
php artisan vendor:publish --tag="filament-breezy-views"
```

Usage &amp; Configuration
-------------------------

[](#usage--configuration)

### Update the auth guard

[](#update-the-auth-guard)

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

```
use Jeffgreco13\FilamentBreezy\BreezyCore;

class CustomersPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ...
            ->authGuard('customers')
            ->plugin(
                BreezyCore::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,

```
BreezyCore::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.

```
BreezyCore::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/users/overview#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\Forms\Components\FileUpload;

BreezyCore::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 reccomended that you create a new migration for it, and add the column there:

```
php artisan make:migration add_avatar_url_column_to_users_table

```

```
