A comprehensive demo application showcasing Filament Admin Panel features alongside the Data Lens reporting plugin. This demo provides a realistic e-commerce and blogging platform with multi-tenant architecture and advanced reporting capabilities.
Open in Gitpod to edit it and preview your changes with no setup required.
Clone the repo locally:
git clone https://github.com/laravel-filament/demo.git filament-demo && cd filament-demo
Install PHP dependencies:
composer install
Setup configuration:
cp .env.example .env
Generate application key:
php artisan key:generate
Create an SQLite database. You can also use another database (MySQL, Postgres), simply update your configuration accordingly.
touch database/database.sqlite
Run database migrations:
php artisan migrate
Run database seeder:
php artisan db:seed
Note
If you get an "Invalid datetime format (1292)" error, this is probably related to the timezone setting of your database.
Please see https://dba.stackexchange.com/questions/234270/incorrect-datetime-value-mysql
Create a symlink to the storage:
php artisan storage:link
Run the dev server (the output will give the address):
php artisan serve
This application includes a demo mode that provides isolated environments for each visitor. To enable it:
Pre-populate the demo user pool before launching:
# Create 50 demo users (default)
php artisan demo:populate
# Or create a specific number
php artisan demo:populate 100
This application uses Laravel Horizon for queue management. Start Horizon to handle background pool replenishment:
php artisan horizon
Access the Horizon dashboard at /horizon
to monitor queue jobs and performance.
Set up a cron job to run the scheduler for automatic cleanup:
# Add to your crontab
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
Or run the scheduler locally for development:
php artisan schedule:work
# Maintain demo system health (cleanup expired data and ensure pool availability)
php artisan demo:refresh
When demo mode is enabled, visitors will be automatically assigned a demo account with isolated data in their own tenant (team).
- Each demo user gets their own isolated tenant (team)
- All data is automatically scoped to the current tenant
- Seamless tenant switching in the admin panel
- Products: Full product catalog with categories, brands, and pricing
- Orders: Complete order management with status tracking
- Customers: Customer profiles with order history and addresses
- Payments: Payment tracking integrated with orders
- Brands: Product brand management with addresses
- Posts: Blog posts with rich content editing
- Authors: Author profiles and post associations
- Categories: Hierarchical category system
- Comments: Polymorphic commenting system
- Custom Reports: Pre-configured reports for sales, customers, inventory, and blog analytics
- Dynamic Filtering: Advanced filtering capabilities on all reports
- Export Functionality: Export report data in various formats
- Saved Views: Save and share custom report configurations
- Automatic demo user assignment from pre-populated pool
- Isolated data environment per visitor
- Background pool replenishment via queues
- Automatic cleanup of expired sessions
- ProductResource
- OrderResource
- PostResource
- CategoryResource\RelationManagers\ProductsRelationManager
- OrderResource\RelationManagers\PaymentsRelationManager
- CustomerResource\RelationManagers\PaymentsRelationManager
- OrderResource -> Address
- ProductResource\RelationManagers\CommentsRelationManager
- PostResource\RelationManagers\CommentsRelationManager
- BrandResource\RelationManagers\AddressRelationManager
- CustomerResource\RelationManagers\AddressRelationManager