A Filament CMS package for Laravel.
Fund package maintenance!
:vendor_name
Requires
- php: ^8.2
- anhskohbo/no-captcha: ^3.7
- awcodes/filament-curator: *
- bezhansalleh/filament-language-switch: ^3.1
- bezhansalleh/filament-shield: ^3.3
- codezero/laravel-unique-translation: ^4.3
- datlechin/filament-menu-builder: ^0.6.6
- filament/filament: ^3.3
- filament/spatie-laravel-settings-plugin: ^3.3
- illuminate/contracts: ^10.0||^11.0||^12.0
- jeffgreco13/filament-breezy: ^2.6
- laravel/framework: ^12.0
- laravel/tinker: ^2.10.1
- littleboy130491/seo-suite: *
- livewire/livewire: ^3.6
- outerweb/filament-translatable-fields: ^2.1
- shuvroroy/filament-spatie-laravel-backup: ^2.2
- solution-forest/filament-translate-field: ^1.4
- spatie/laravel-package-tools: ^1.16
- spatie/laravel-responsecache: ^7.7
- spatie/laravel-settings: ^3.4
- spatie/laravel-sitemap: ^7.3
- spatie/laravel-translatable: ^6.11
- stechstudio/filament-impersonate: ^3.16
- symfony/http-client: ^7.2
- symfony/mailgun-mailer: ^7.2
- yizack/instagram-feed: ^2.0
Requires (Dev)
- fakerphp/faker: ^1.23
- larastan/larastan: ^2.9||^3.0
- laravel/pail: ^1.2.2
- laravel/pint: ^1.13
- laravel/sail: ^1.41
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.8
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.2
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
- spatie/laravel-ray: ^1.35
This package is auto-updated.
Last update: 2025-06-15 04:40:35 UTC
README
A powerful, multilingual Laravel CMS package built with Filament v3. Features hierarchical content management, role-based permissions, dynamic components, and extensive customization options.
Features
🌐 Multilingual Content - Full translation support with smart fallback and URL redirection
📝 Content Management - Pages, posts, categories, tags, and comments with hierarchical structure
🔐 Role-Based Access - Comprehensive permission system with predefined roles
🧩 Dynamic Components - Flexible component system for reusable content blocks
📊 SEO Optimized - Built-in SEO suite integration and sitemap generation
📱 Responsive Admin - Beautiful Filament-powered admin interface
🎨 Template System - WordPress-like template hierarchy for complete design control
📧 Form System - Built-in contact forms with email notifications and reCAPTCHA
📈 Analytics - Page views and likes tracking with real-time updates
🔄 Scheduled Publishing - Automatic content publishing with cron integration
📷 Media Management - Advanced media handling with Curator integration
🎯 Performance - Optimized queries, caching, and queue support
Requirements
- PHP 8.2+
- Laravel 12.0+
- MySQL 8.0+ / PostgreSQL 13+
- Node.js 18+ (for asset compilation)
Installation
Step 1: Install Package
composer require littleboy130491/cms
Step 2: Run Installation Command
php artisan cms:install
This command will:
- Publish configuration files
- Publish and run migrations
- Publish views and assets
- Generate default permission roles
- Guide you through the setup process
Step 3: Configure Environment
Add required environment variables to your .env
file:
# reCAPTCHA (optional but recommended) NOCAPTCHA_SITEKEY=your_recaptcha_site_key NOCAPTCHA_SECRET=your_recaptcha_secret_key # Instagram Integration (optional) INSTAGRAM_ACCESS_TOKEN=your_instagram_access_token # Admin Email for Notifications MAIL_ADMIN_EMAIL=admin@yoursite.com # Debug Mode (development only) CMS_DEBUG_MODE_ENABLED=false
Note: The CMS plugin is automatically registered with all Filament panels. No manual plugin registration is required!
Quick Start
1. Create Your First Admin User
php artisan make:filament-user
2. Access Admin Panel
Visit /admin
and log in with your newly created admin account.
3. Configure General Settings
Navigate to Settings > General in the admin panel to configure:
- Site name and description
- Contact information
- Social media links
- Logo and favicon
4. Create Your First Content
- Pages: Create static pages like "About", "Contact", etc.
- Posts: Create blog posts or news articles
- Categories & Tags: Organize your content
- Menus: Build navigation menus
Configuration
Content Models Configuration
The CMS supports multiple content types defined in config/cms.php
:
'content_models' => [ 'pages' => [ 'model' => \Littleboy130491\Sumimasen\Models\Page::class, 'route_prefix' => '', 'translatable' => true, ], 'posts' => [ 'model' => \Littleboy130491\Sumimasen\Models\Post::class, 'route_prefix' => 'blog', 'translatable' => true, 'archive_view' => 'templates.archives.posts', ], // Add your custom content types here ],
Multilingual Setup
Configure supported languages:
'multilanguage_enabled' => true, 'default_language' => 'en', 'language_available' => [ 'en' => 'English', 'id' => 'Indonesian', 'zh' => 'Chinese', 'ko' => 'Korean', ],
Template System
Create custom templates in resources/views/templates/
:
templates/
├── default.blade.php # Default template
├── home.blade.php # Home page template
├── singles/
│ ├── page.blade.php # All pages
│ ├── post.blade.php # All posts
│ └── page-about.blade.php # Specific page
└── archives/
├── archive.blade.php # Default archive
└── posts.blade.php # Posts archive
Available Commands
Content Management
# Install CMS php artisan cms:install # Generate permission roles php artisan cms:generate-roles # Publish scheduled content php artisan cms:publish-scheduled-content # Generate sitemap php artisan cms:generate-sitemap
Development Tools
# Create new model php artisan cms:create-model # Create new migration php artisan cms:create-migration # Create new exporter php artisan cms:create-exporter # Create new importer php artisan cms:create-importer
Media & External Services
# Sync Curator media files php artisan cms:sync-curator-media # Refresh Instagram token php artisan cms:refresh-instagram-token
Advanced Features
Dynamic Components
Create reusable content blocks:
- Create Component in Admin: Add a new component with a unique name
- Create Blade Template:
resources/views/components/dynamic/{name}.blade.php
- Use in Templates:
<x-component-loader name="your-component" />
Example component template:
{{-- resources/views/components/dynamic/hero-slider.blade.php --}} @foreach ($componentData->blocks as $block) @if ($block['type'] === 'slide') <div class="slide"> <h2>{{ $block['data']['heading'] }}</h2> <p>{{ $block['data']['description'] }}</p> @if(isset($block['data']['image_url'])) <img src="{{ $block['data']['image_url'] }}" alt="{{ $block['data']['heading'] }}"> @endif </div> @endif @endforeach
Livewire Components
Built-in interactive components:
{{-- Like button with real-time updates --}} <livewire:like-button :content="$post" /> {{-- Contact form with reCAPTCHA --}} <livewire:submission-form />
Settings Management
Access site settings in templates:
@php $settings = app(\App\Settings\GeneralSettings::class); @endphp <footer> <p>{{ $settings->site_name }}</p> <p>Email: {{ $settings->email }}</p> <p>Phone: {{ $settings->phone_1 }}</p> </footer>
SEO Features
Automatic SEO optimization:
- Meta titles and descriptions
- Open Graph tags
- Structured data
- XML sitemap generation
- Multilingual hreflang tags
Debug Mode
Enable comprehensive debugging in development:
CMS_DEBUG_MODE_ENABLED=true APP_ENV=local
Provides detailed HTML comments with:
- Request information
- Database queries
- View data
- Performance metrics
Scheduled Tasks
Set up cron job for automated features:
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
Automated tasks include:
- Publishing scheduled content (every 30 minutes)
- Refreshing Instagram tokens (monthly)
- Other maintenance tasks
Security Features
- CSRF protection on all forms
- XSS prevention with input sanitization
- Role-based access control
- reCAPTCHA integration
- Secure file uploads
- Input validation and filtering
Performance Optimization
- Query optimization with eager loading
- Response caching support
- Image optimization with Curator
- Queue support for heavy operations
- Database indexing
- Asset minification
Customization
Extending Models
Add traits to your models:
use Littleboy130491\Sumimasen\Traits\HasPageViews; use Littleboy130491\Sumimasen\Traits\HasPageLikes; class CustomModel extends Model { use HasPageViews, HasPageLikes; }
Custom Resources
Override default resources:
SumimasenPlugin::make() ->resources([ CustomPostResource::class, // ... other resources ])
Custom Templates
Create specialized templates:
page-{slug}.blade.php
- Specific pagessingle-{type}.blade.php
- Content typesarchive-{type}.blade.php
- Archive pagestaxonomy-{taxonomy}.blade.php
- Taxonomy archives
Testing
Run the test suite:
composer test
Run specific test types:
composer test-coverage # With coverage report composer analyse # Static analysis composer format # Code formatting
Troubleshooting
Common Issues
Plugin not showing resources:
- Ensure plugin is registered in panel provider
- Clear Filament cache:
php artisan filament:optimize-clear
Migrations failing:
- Check database permissions
- Ensure all required packages are installed
- Run:
php artisan migrate:status
Assets not loading:
- Publish assets:
php artisan vendor:publish --tag=cms-views
- Clear view cache:
php artisan view:clear
reCAPTCHA not working:
- Verify site and secret keys
- Check domain registration in Google Console
- Ensure HTTPS in production
Debug Mode
Enable debug mode for detailed error information:
CMS_DEBUG_MODE_ENABLED=true APP_DEBUG=true
Contributing
Please see CONTRIBUTING for details on how to contribute to this project.
Security
If you discover any security vulnerabilities, please email security@yourproject.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Support
Built with ❤️ using Laravel, Filament, and modern PHP practices.