| Install | |
|---|---|
composer require fullstack/redbird |
|
| Latest Version: | 0.2.40 |
| PHP: | ^8.2 |
A comprehensive Laravel SaaS package with Filament admin panel, user management, and subscription billing.
The package uses your application's default User model (configured in config/auth.php). Your User model must include the Spatie Permission traits to enable role management:
<?php
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable
{
use HasRoles;
// ... your existing code
}
If you don't have the Spatie Permission package installed, the installation command will install it for you.
composer require fullstack/redbird
php artisan redbird:install
This command will:
php artisan make:filament-user
Add the following to your .env file:
# Redbird Configuration
REDBIRD_APP_NAME="Your SaaS App"
REDBIRD_ADMIN_PATH=admin
# Stripe Configuration (if using subscriptions)
STRIPE_KEY=your-stripe-publishable-key
STRIPE_SECRET=your-stripe-secret-key
STRIPE_WEBHOOK_SECRET=your-stripe-webhook-secret
# Feature Flags
REDBIRD_SUBSCRIPTIONS_ENABLED=true
REDBIRD_USER_REGISTRATION=true
REDBIRD_EMAIL_VERIFICATION=true
If you experience broken CSS in the admin panel, ensure Filament assets are properly published:
# Publish Filament assets manually if needed
php artisan vendor:publish --tag=filament-assets
# Clear cache and recompile assets
php artisan config:clear
php artisan cache:clear
php artisan view:clear
Visit /admin (or your configured admin path) to access the Filament admin panel.
Redbird includes several built-in dashboard widgets for SaaS analytics:
The package includes comprehensive subscription management:
// Create a subscription
$user->newSubscription('default', 'price_123')->create();
// Check subscription status
if ($user->subscription('default')->active()) {
// User has active subscription
}
// Handle subscription changes
$user->subscription('default')->swap('price_456');
Redbird supports multiple Filament panels for different user types:
/admin) - For super admins and system management/tenant) - For tenant/organization management/member) - For end users and customersEach panel can have its own:
The package configuration can be found in config/redbird.php. You can customize:
Define your Filament panels in the panels section of the config:
'panels' => [
'admin' => [
'path' => env('REDBIRD_ADMIN_PATH', 'admin'),
'domain' => env('REDBIRD_ADMIN_DOMAIN', null),
'guard' => ['admin'],
],
'tenant' => [
'path' => env('REDBIRD_TENANT_PATH', 'tenant'),
'domain' => env('REDBIRD_TENANT_DOMAIN', null),
'guard' => ['tenant'],
],
'member' => [
'path' => env('REDBIRD_MEMBER_PATH', 'member'),
'domain' => env('REDBIRD_MEMBER_DOMAIN', null),
'guard' => ['web'],
],
],
During installation, this will generate:
app/Providers/Filament/AdminPanelProvider.php → /adminapp/Providers/Filament/TenantPanelProvider.php → /tenantapp/Providers/Filament/MemberPanelProvider.php → /memberYou can publish specific assets using tags:
# Publish configuration only
php artisan vendor:publish --tag=redbird-config
# Publish migrations only
php artisan vendor:publish --tag=redbird-migrations
# Publish seeders only
php artisan vendor:publish --tag=redbird-seeders
# Publish views only
php artisan vendor:publish --tag=redbird-views
# Publish Filament assets (CSS, JS)
php artisan vendor:publish --tag=filament-assets
# Publish Filament resources for customization
php artisan vendor:publish --tag=redbird-filament
# Publish view components for customization
php artisan vendor:publish --tag=redbird-components
# Publish attributes for customization
php artisan vendor:publish --tag=redbird-attributes
# Force overwrite existing files
php artisan redbird:install --force
Note: The installation command will offer to publish Filament resources automatically. These resources include all the admin panel components and can be customized after publishing.
php artisan redbird:install - Install the packagephp artisan redbird:install --force - Reinstall and overwrite existing filesvendor/bin/phpunit
User Model Missing HasRoles Trait If you get "Call to undefined method assignRole()" errors:
use Spatie\Permission\Traits\HasRoles;php artisan redbird:install again to set up rolesExisting Application Conflicts The installation command will detect potential conflicts in existing applications:
Filament Panel Not Loading
php artisan redbird:install.env configuration matches the panel settingsThe MIT License (MIT). Please see License File for more information.