- Can I use tomatophp/filament-cms without Filament already installed in my Laravel project?
- No, this package requires FilamentPHP (v3+) as a dependency. If you don’t already have Filament installed, you’ll need to add it first via `composer require filament/filament`. The package integrates seamlessly with Filament’s admin panel, so it’s designed as an extension, not a standalone solution.
- What Laravel versions does tomatophp/filament-cms support?
- The package supports Laravel 10.x and 11.x, aligning with Filament’s latest requirements. Always check the package’s `composer.json` or Filament’s documentation for the most up-to-date version compatibility, as Laravel minor updates may introduce breaking changes.
- How do I install and set up tomatophp/filament-cms in my project?
- Run `composer require tomatophp/filament-cms` to install the package, then execute `php artisan filament-cms:install` to publish assets, migrations, and configuration files. Follow the prompts to configure your CMS settings, and register the CMS panel in your Filament admin provider.
- Does this package support multi-language (i18n) content management?
- The package does not explicitly include built-in multi-language support. However, you can implement localization manually using Laravel’s built-in localization features (e.g., `trans()` helpers, language switchers) and extend the CMS models to store translatable content. For advanced i18n, consider pairing it with packages like `spatie/laravel-translatable`.
- Can I customize or extend the page builder blocks in tomatophp/filament-cms?
- Yes, the package is designed for extensibility. You can create custom blocks by defining new PHP classes that extend the base block system. For complex UI interactions, you may need to override client-side JavaScript (likely Alpine.js or Vue) or add custom widgets. The README should outline the block registration process.
- How does tomatophp/filament-cms handle media and file uploads?
- The package uses `spatie/laravel-medialibrary` for media management, which supports local storage, S3, and other cloud providers. Uploaded files are stored in the database with metadata, and you can access them via Eloquent relationships. Ensure your storage configuration is set up correctly in `.env` for optimal performance.
- Will tomatophp/filament-cms work well with a headless frontend (React/Vue/Next.js)?
- While not headless-first, the package provides API endpoints via Filament’s built-in API, allowing you to fetch CMS content for decoupled frontends. You’ll need to manually structure your API routes or extend Filament’s API resources to expose the data your frontend requires. Caching responses (e.g., with Redis) is recommended for performance.
- Are there performance concerns with the page builder’s client-side UI?
- The page builder relies on client-side JavaScript (likely Alpine.js or Vue), which can introduce overhead, especially on low-end servers or shared hosting. For production, optimize by minifying assets, enabling Filament’s caching, and considering server-side rendering for critical admin routes. Avoid heavy customizations that bloat the frontend.
- How do I back up media assets managed by tomatophp/filament-cms?
- Media assets stored via `spatie/laravel-medialibrary` can be backed up by including the `media` table in your database backups. For file storage (e.g., S3 or local), ensure your backup strategy covers the configured storage path. Use Laravel’s `backup` package or third-party tools like `laravel-backup` to automate backups of both database and files.
- What alternatives exist if tomatophp/filament-cms doesn’t fit my project’s needs?
- If you’re using Filament, alternatives include `filament/spatie-media-library-integration` for media-heavy projects or building a custom CMS with Filament’s resources. For non-Filament Laravel projects, consider `orchid/platform`, `backpack/cms`, or `cms-trait` for simpler needs. For headless setups, Strapi or Directus might be better fits, though they require separate installations.