Ready to use SaaS panel with integration of Filament Accounts Builder and JetStream teams
composer require tomatophp/filament-saas-panel
now you need to publish teams migration
php artisan vendor:publish --tag="filament-saas-teams-migrations"
after install your package please run this command
php artisan filament-saas-panel:install
now you need to publish teams models and account model with injection of teams
php artisan vendor:publish --tag="filament-saas-teams-models"php artisan vendor:publish --tag="filament-saas-account-model"
create a new panel for app
php artisan filament:panel app
finally register the plugin on /app/Providers/Filament/AppPanelProvider.php
->plugin( \TomatoPHP\FilamentSaasPanel\FilamentSaasPanelPlugin::make() ->editTeam() ->deleteTeam() ->showTeamMembers() ->teamInvitation() ->allowTenants() ->checkAccountStatusInLogin() ->APITokenManager() ->editProfile() ->editPassword() ->browserSessionManager() ->deleteAccount() ->editProfileMenu() ->registration() ->useOTPActivation())
on your admin panel provider if you like to have Team resource and features register this
->plugin( \TomatoPHP\FilamentSaasPanel\FilamentSaasTeamsPlugin::make() ->allowAccountTeamTableAction() ->allowAccountTeamTableBulkAction() ->allowAccountTeamFilter() ->allowAccountTeamFormComponent() ->allowAccountTeamTableColumn())
if you like to change the panel name on your config just change id
and name
on config/filament-saas-panel.php
return [ "id" => "user"];
you can publish it from this command
php artisan vendor:publish --tag="filament-saas-panel-config"
you can change any page you want on the panel using the config like this
'pages' => [ 'teams' => [ 'create' => \TomatoPHP\FilamentSaasPanel\Filament\Pages\CreateTeam::class, 'edit' => \TomatoPHP\FilamentSaasPanel\Filament\Pages\EditTeam::class, ], 'profile' => [ 'edit' => \TomatoPHP\FilamentSaasPanel\Filament\Pages\EditProfile::class, ], 'auth' => [ 'login' => \TomatoPHP\FilamentSaasPanel\Filament\Pages\Auth\LoginAccount::class, 'register' => \TomatoPHP\FilamentSaasPanel\Filament\Pages\Auth\RegisterAccount::class, 'register-without-otp' => \TomatoPHP\FilamentSaasPanel\Filament\Pages\Auth\RegisterAccountWithoutOTP::class, ],],
you can publish config file by use this command
php artisan vendor:publish --tag="filament-saas-panel-config"
you can publish views file by use this command
php artisan vendor:publish --tag="filament-saas-panel-views"
you can publish languages file by use this command
php artisan vendor:publish --tag="filament-saas-panel-lang"
you can publish migrations file by use this command
php artisan vendor:publish --tag="filament-saas-panel-migrations"
if you like to run PEST
testing just use this command
composer test
if you like to fix the code style just use this command
composer format
if you like to check the code by PHPStan
just use this command
composer analyse
Checkout our Awesome TomatoPHP