{"id":22238525,"url":"https://github.com/tomatophp/filament-users","last_synced_at":"2025-04-12T20:43:07.659Z","repository":{"id":196974965,"uuid":"697369571","full_name":"tomatophp/filament-users","owner":"tomatophp","description":"Manage your users with a highly customizable user resource for FilamentPHP with integration of filament-shield and filament-impersonate","archived":false,"fork":false,"pushed_at":"2025-03-24T11:58:57.000Z","size":4351,"stargazers_count":60,"open_issues_count":0,"forks_count":24,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T00:30:09.680Z","etag":null,"topics":["authentication","filamentphp","user","user-crud","user-resource"],"latest_commit_sha":null,"homepage":"https://tomatophp.com/en/open-source/filament-users","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomatophp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["3x1io"]}},"created_at":"2023-09-27T15:32:25.000Z","updated_at":"2025-03-24T11:58:33.000Z","dependencies_parsed_at":"2023-11-22T22:22:53.436Z","dependency_job_id":"b7f946d6-5642-409a-b250-46f7b373c3fa","html_url":"https://github.com/tomatophp/filament-users","commit_stats":null,"previous_names":["tomatophp/filament-users"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomatophp%2Ffilament-users","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomatophp%2Ffilament-users/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomatophp%2Ffilament-users/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomatophp%2Ffilament-users/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomatophp","download_url":"https://codeload.github.com/tomatophp/filament-users/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631675,"owners_count":21136555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","filamentphp","user","user-crud","user-resource"],"created_at":"2024-12-03T03:16:56.871Z","updated_at":"2025-04-12T20:43:07.629Z","avatar_url":"https://github.com/tomatophp.png","language":"PHP","funding_links":["https://github.com/sponsors/3x1io"],"categories":[],"sub_categories":[],"readme":"![Screenshot](https://raw.githubusercontent.com/tomatophp/filament-users/master/arts/3x1io-tomato-users.jpg)\n\n# Filament Users Manager\n\n[![Dependabot Updates](https://github.com/tomatophp/filament-users/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/tomatophp/filament-users/actions/workflows/dependabot/dependabot-updates)\n[![PHP Code Styling](https://github.com/tomatophp/filament-users/actions/workflows/fix-php-code-styling.yml/badge.svg)](https://github.com/tomatophp/filament-users/actions/workflows/fix-php-code-styling.yml)\n[![Tests](https://github.com/tomatophp/filament-users/actions/workflows/tests.yml/badge.svg)](https://github.com/tomatophp/filament-users/actions/workflows/tests.yml)\n[![Latest Stable Version](https://poser.pugx.org/tomatophp/filament-users/version.svg)](https://packagist.org/packages/tomatophp/filament-users)\n[![License](https://poser.pugx.org/tomatophp/filament-users/license.svg)](https://packagist.org/packages/tomatophp/filament-users)\n[![Downloads](https://poser.pugx.org/tomatophp/filament-users/d/total.svg)](https://packagist.org/packages/tomatophp/filament-users)\n\nManage your users with a highly customizable user resource for FilamentPHP with integration of filament-shield and filament-impersonate.\n\nfor filament v2 please use this [repo](https://github.com/3x1io/filament-user)\n\n## Features\n\n- [x] Users Resource\n- [x] Allow To Publish User Resource\n- [x] Allow To Use Shield\n- [x] Allow To Use Impersonate\n- [x] Allow To Use Facade Class to custom the current user resource\n- [x] Integration with Laravel Jetstream teams\n- [x] custom User model from config file\n- [x] custom Team model from config file\n- [x] custom Role model from config file\n- [ ] Laravel Jetsream user profile page\n- [ ] Allow User / Teams Avatars\n- [ ] Custom Register/Login Pages for Laravel Jetstream\n- [ ] Add OTP Page to Register process\n\n## Screenshots\n\n![Users List](https://raw.githubusercontent.com/tomatophp/filament-users/master/arts/user-list.png)\n![Create User](https://raw.githubusercontent.com/tomatophp/filament-users/master/arts/create.png)\n![Edit User](https://raw.githubusercontent.com/tomatophp/filament-users/master/arts/edit.png)\n![Users Filters](https://raw.githubusercontent.com/tomatophp/filament-users/master/arts/filters.png)\n![Delete Current User](https://raw.githubusercontent.com/tomatophp/filament-users/master/arts/delete-current-user.png)\n![Impersonate](https://raw.githubusercontent.com/tomatophp/filament-users/master/arts/impersonate.png)\n![Shield](https://raw.githubusercontent.com/tomatophp/filament-users/master/arts/shield.png)\n![Roles Bulk Action](https://raw.githubusercontent.com/tomatophp/filament-users/master/arts/roles.png)\n![Edit Roles](https://raw.githubusercontent.com/tomatophp/filament-users/master/arts/edit-roles.png)\n\n## Installation\n\n```bash\ncomposer require tomatophp/filament-users\n```\n\nfinally register the plugin on `/app/Providers/Filament/AdminPanelProvider.php`\n\n```php\n-\u003eplugin(\\TomatoPHP\\FilamentUsers\\FilamentUsersPlugin::make())\n```\n\n## Use Filament Shield\n\nyou can use the shield to protect your resource and allow user roles by install it first\n\n```bash\ncomposer require bezhansalleh/filament-shield\n```\n\nAdd the Spatie\\Permission\\Traits\\HasRoles trait to your User model(s):\n\n```php\nuse Illuminate\\Foundation\\Auth\\User as Authenticatable;\nuse Spatie\\Permission\\Traits\\HasRoles;\n\nclass User extends Authenticatable\n{\n    use HasRoles;\n\n    // ...\n}\n```\nPublish the config file then setup your configuration:\n\n```php\n-\u003eplugin(\\BezhanSalleh\\FilamentShield\\FilamentShieldPlugin::make())\n```\n\nNow run the following command to install shield:\n\n```bash\nphp artisan shield:install\n```\n\nNow we can [publish the package assets]([https://github.com/bezhanSalleh/filament-shield](https://github.com/tomatophp/filament-users?tab=readme-ov-file#publish-assets)).\n```bash\nphp artisan vendor:publish --tag=\"filament-users-config\"\n```\nnow on your `filament-users.php` config allow shield\n\n```php\n/*\n * User Filament Shield\n */\n\"shield\" =\u003e true,\n```\n\nnow clear your config\n\n```bash\nphp artisan config:cache\n```\n\nfor more information check the [Filament Shield](https://github.com/bezhanSalleh/filament-shield)\n\n## Use Filament Impersonate\n\nyou can use the impersonate to impersonate the user by install it first\n\n```bash\ncomposer require stechstudio/filament-impersonate\n```\n\nnow on your `filament-users.php` config allow shield\n\n```php\n/*\n * User Filament Impersonate\n */\n\"impersonate\" =\u003e true,\n```\n\nnow clear your config\n\n```bash\nphp artisan config:cache\n```\n\nfor more information check the [Filament Impersonate](https://github.com/stechstudio/filament-impersonate)\n\n## Use Laravel Jetstream Teams\n\nyou can use the Laravel Jetstream Teams by install it first\n\n```bash\ncomposer require laravel/jetstream\n```\n\nnow you need to install the jetstream with livewire\n\n```bash\nphp artisan jetstream:install livewire\n```\n\ngo to `jetstream.php` and allow teams feature\n\n```php\n'features' =\u003e [\n//     Features::termsAndPrivacyPolicy(),\n//     Features::profilePhotos(),\n//     Features::api(),\n     Features::teams(['invitations' =\u003e true]),\n//     Features::accountDeletion(),\n],\n```\n\nnow you need to publish teams migration from jetstream\n\n```bash\nphp artisan vendor:publish --tag=jetstream-teams-migrations\n```\n\nnow you need to migrate the teams migration\n\n```bash\nphp artisan migrate\n```\n\nnow on your `filament-users.php` config allow shield\n\n```php\n/*\n * User Filament Teams\n */\n\"teams\" =\u003e true,\n```\n\nnow clear your config\n\n```bash\nphp artisan config:cache\n```\n\n## Publish Resource\n\nyou can publish the resource to your project\n\n```bash\nphp artisan filament-users:publish\n```\n\nit will publish the resource to your project\n\nthan go to `filament-users.php` config file and change the `publish_resource` to `true`\n\n## Register User Relation Manager\n\nyou can register the user relation manager to your project\n\n\n```php\nuse TomatoPHP\\FilamentUsers\\Facades\\FilamentUser;\n\npublic function boot()\n{\n    FilamentUser::register([\n        \\Filament\\Resources\\RelationManagers\\RelationManager::make() // Replace with your custom relation manager\n    ]);\n}\n```\n\n## User Users Resource Hooks\n\nwe have add a lot of hooks to make it easy to attach actions, columns, filters, etc\n\n### Table Columns\n\n```php\nuse TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Table\\UserTable;\n\npublic function boot()\n{\n    UserTable::register([\n        \\Filament\\Tables\\Columns\\TextColumn::make('something')\n    ]);\n}\n```\n\n### Table Actions\n\n```php\nuse TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Table\\UserActions;\n\npublic function boot()\n{\n    UserActions::register([\n        \\Filament\\Tables\\Actions\\ReplicateAction::make()\n    ]);\n}\n```\n\n### Table Filters\n\n```php\nuse TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Table\\UserFilters;\n\npublic function boot()\n{\n    UserFilters::register([\n        \\Filament\\Tables\\Filters\\SelectFilter::make('something')\n    ]);\n}\n```\n\n### Table Bulk Actions\n\n```php\nuse TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Table\\UserBulkActions;\n\npublic function boot()\n{\n    UserBulkActions::register([\n        \\Filament\\Tables\\BulkActions\\DeleteAction::make()\n    ]);\n}\n```\n\n### From Components\n\n```php\nuse TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Form\\UserForm;\n\npublic function boot()\n{\n    UserForm::register([\n        \\Filament\\Forms\\Components\\TextInput::make('something')\n    ]);\n}\n```\n\n### Page Actions\n\n```php\nuse TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Actions\\ManageUserActions;\nuse TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Actions\\EditPageActions;\nuse TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Actions\\ViewPageActions;\nuse TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Actions\\CreatePageActions;\n\npublic function boot()\n{\n    ManageUserActions::register([\n        Filament\\Actions\\Action::make('action')\n    ]);\n    \n    EditPageActions::register([\n        Filament\\Actions\\Action::make('action')\n    ]);\n    \n    ViewPageActions::register([\n        Filament\\Actions\\Action::make('action')\n    ]);\n    \n    CreatePageActions::register([\n        Filament\\Actions\\Action::make('action')\n    ]);\n}\n```\n\n### Infolist Entries\n\n```php\nuse TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Infolist\\UserInfolist;\n\npublic function boot()\n{\n    UserInfolist::register([\n       \\Filament\\Infolists\\Components\\TextEntry::make('something')\n    ]);\n}\n```\n\n## Custom Resource Classes\n\nyou can customize all resource classes to be any class you want with the same return from the config file\n\n```php\n/**\n * ---------------------------------------------\n * Resource Building\n * ---------------------------------------------\n * if you want to use the resource custom class\n */\n'resource' =\u003e [\n    'table' =\u003e [\n        'class' =\u003e \\TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Table\\UserTable::class,\n        'filters' =\u003e \\TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Table\\UserFilters::class,\n        'actions' =\u003e \\TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Table\\UserActions::class,\n        'bulkActions' =\u003e \\TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Table\\UserBulkActions::class,\n    ],\n    'form' =\u003e [\n        'class' =\u003e \\TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Form\\UserForm::class\n    ],\n    'infolist' =\u003e [\n        'class' =\u003e \\TomatoPHP\\FilamentUsers\\Resources\\UserResource\\InfoList\\UserInfoList::class\n    ],\n    'pages' =\u003e [\n        'list' =\u003e \\TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Actions\\ManageUserActions::class,\n        'create' =\u003e \\TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Actions\\CreatePageActions::class,\n        'edit' =\u003e \\TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Actions\\EditPageActions::class,\n        'view' =\u003e \\TomatoPHP\\FilamentUsers\\Resources\\UserResource\\Actions\\ViewPageActions::class\n    ]\n]\n```\n\n## Use  Simple User Resource\n\nyou can use the simple user resource by change on config, on your `filament-users.php` config allow simple\n\n```php\n/**\n * ---------------------------------------------\n * Use Simple Resource\n * ---------------------------------------------\n * change the resource from pages to modals by allow simple resource.\n */\n'simple' =\u003e true,\n```\n\n## Publish Assets\n\nyou can publish config file by use this command\n\n```bash\nphp artisan vendor:publish --tag=\"filament-users-config\"\n```\n\nyou can publish languages file by use this command\n\n```bash\nphp artisan vendor:publish --tag=\"filament-users-lang\"\n```\n\n## Testing\n\nif you like to run `PEST` testing just use this command\n\n```bash\ncomposer test\n```\n\n## Code Style\n\nif you like to fix the code style just use this command\n\n```bash\ncomposer format\n```\n\n## PHPStan\n\nif you like to check the code by `PHPStan` just use this command\n\n```bash\ncomposer analyse\n```\n\n## Other Filament Packages\n\nCheckout our [Awesome TomatoPHP](https://github.com/tomatophp/awesome)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomatophp%2Ffilament-users","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomatophp%2Ffilament-users","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomatophp%2Ffilament-users/lists"}