tomatophp / filament-saas-panel

Ready to use SaaS panel with integration of Filament Accounts Builder and JetStream teams
MIT License
5 stars 0 forks source link

Screenshot

Filament SaaS Panel

Dependabot Updates PHP Code Styling Tests Latest Stable Version License Downloads

Ready to use SaaS panel with integration of Filament Accounts Builder and JetStream teams

Features

Screenshot Teams

Team List Create Team Edit Team

Screenshot Account Team Components

Account Team Form Component Account Team Table Column Account Team Table Action

Screenshots Auth Process

Login OTP Screen Register Create Tenant

Screenshot Panel

Panel Panel Tenant Menu

Screenshot Edit Teams

Team Invite Team Members Team Settings Team Settings Not Owner

Screenshots Edit Profile

Edit Profile Change Password Delete Modal Logout Modal Session & Delete Account

Screenshot API Tokens

API Tokens Create Token Token Modal

Installation

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()
)

Change Panel ID

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"

Custom Pages

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,
    ],
],

Publish Assets

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"

Testing

if you like to run PEST testing just use this command

composer test

Code Style

if you like to fix the code style just use this command

composer format

PHPStan

if you like to check the code by PHPStan just use this command

composer analyse

Other Filament Packages

Checkout our Awesome TomatoPHP