- Can I use Sharp to build a headless CMS for Laravel without writing frontend code?
- Yes, Sharp is designed for headless CMS use cases. It provides a PHP API for CRUD, search, filtering, and validation, while the UI is auto-generated via Inertia.js. You can serve content via Laravel’s API routes or directly to a frontend framework like React or Vue.
- What Laravel and PHP versions does Sharp support?
- Sharp requires **Laravel 11+** and **PHP 8.3+**. It leverages modern Laravel features like enums, attributes, and first-class Inertia.js support. If you’re on an older version, Sharp won’t work without significant upgrades.
- How does Sharp handle authorization and validation?
- Sharp integrates seamlessly with Laravel’s built-in authorization (e.g., gates, policies) and validation system. You define rules directly in your PHP entities, and Sharp enforces them automatically. It also supports custom 2FA (TOTP or notification-based) out of the box.
- Do I need to use Inertia.js, or can I integrate Sharp with a different frontend framework?
- Sharp’s UI is auto-generated via **Inertia.js** (React/Vue/Svelte), but you can also use **Blade templates** for server-side rendering. If you’re using a SPA framework like React or Vue, Inertia.js provides a smooth integration. For other frameworks, you’d need to build custom API endpoints.
- What’s the migration path if I’m upgrading from Sharp 8.x to 9.x?
- Sharp 9.x introduces breaking changes, including updates to the config builder, middleware, and icon handling. Review the [upgrade guide](http://sharp.code16.fr/docs) for details on refactoring your `config/sharp.php`, middleware, and icon dependencies (e.g., switching from Blade Icons to Font Awesome). Test thoroughly in a staging environment.
- Can Sharp work with databases other than MySQL or PostgreSQL?
- Sharp is **data-agnostic**, meaning it doesn’t enforce a specific persistence layer. While it defaults to Eloquent (which supports MySQL, PostgreSQL, SQLite, etc.), you can extend it to work with APIs, NoSQL databases, or custom storage logic by implementing Sharp’s `EntityRepository` interface.
- How does Sharp handle search, filtering, and sorting?
- Sharp supports **Laravel Scout** (Algolia, Meilisearch) and custom search engines. Filtering and sorting are defined in your PHP entities using fluent methods, and Sharp generates the UI controls automatically. For complex queries, you can extend the `QueryBuilder` trait.
- Are there alternatives to Sharp for Laravel CMS development?
- Yes, alternatives include **Backpack for Laravel** (more UI-focused), **Nova** (Laravel’s official admin panel), **Filament** (modern, component-based), or **October CMS** (if you’re open to non-package solutions). Sharp stands out for its **code-first, data-agnostic** approach and Inertia.js integration.
- How do I customize Sharp’s UI or add new fields to entities?
- Sharp’s UI is auto-generated, but you can override it using **Inertia.js pages** or **Blade templates**. For entity fields, extend the `Entity` class and define fields in PHP. Custom validation, commands, or workflows are added via PHP traits or service providers—no frontend code required.
- Is Sharp suitable for production use, and what’s the long-term support like?
- Sharp is actively maintained (last release: **2026-04-01**) and used in production by Code16 and other teams. It follows Laravel’s release cycle and includes features like 2FA, authorization, and validation. However, since it’s a niche package, monitor its [GitHub](https://github.com/code16/sharp) and [Discord](https://discord.com/invite/sFBT5c3XZz) for updates.