PHP code example of panservicesas / filament-users

1. Go to this page and download the library: Download panservicesas/filament-users library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

panservicesas / filament-users example snippets


return [
    'resource' => [
        'slug' => 'users',
        'group' => null,
        'cluster' => null,
        'sub_navigation_position' => \Filament\Pages\Enums\SubNavigationPosition::Start,
        'class' => \Panservice\FilamentUsers\Filament\Resources\UserResource::class,
        'model' => \App\Models\User::class,
        'roles' => [
            'type' => 'select', //can be 'select' or 'checkbox'
            'multiple' => false,
        ],
        'datetime_format' => 'd/m/Y H:i:s',
        'filters' => [
            'date_format' => 'd/m/Y',
        ],
        'global_search' => [
            'title' => '',
            'attributes' => [],
            'enabled' => false,
        ],
    ],
    'email' => [
        'logo' => null,
        'footer_text' => null,
        'layout' => 'filament-users::layouts.email',
    ],
];

->plugin(\Panservice\FilamentUsers\FilamentUsersPlugin::make())

->enableTwoFactorAuthentication(
    force: fn() => App::environment('production') && !auth()->user()?->ignore_2fa,
)
bash
php artisan vendor:publish --tag="filament-users-config"
bash
php artisan vendor:publish --tag="filament-users-views"