Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sharp Laravel Package

code16/sharp

Sharp is a Laravel 11+ (PHP 8.3+) content management framework for building a CMS/admin area with a clean UI and great DX. Code-driven, data-agnostic, no frontend to write. Manage structured data with search, filters, commands, auth, and validation.

View on GitHub
Deep Wiki
Context7

Sharp is a content management framework for Laravel delivered as a package, designed to build a full CMS section with a clean UI and strong developer experience. It’s code-driven (configured via a documented PHP API), follows Laravel conventions, stays data-agnostic, and aims to keep your domain code independent from the admin layer.

  • Create, update, delete structured data with validation and clear error handling
  • List, search, sort, filter and navigate datasets efficiently
  • Run custom commands on one item, selections, or entire collections
  • Built-in authorization and form validation workflows
  • No frontend code required; powered by a clean PHP API (Laravel 11+, PHP 8.3+)
Frequently asked questions about Sharp
What Laravel versions does Sharp support, and is it compatible with PHP 8.2?
Sharp requires **Laravel 11+** and **PHP 8.3+** due to its reliance on modern Laravel features like Enums, Attributes, and Fiber-based HTTP. PHP 8.2 is not supported, as Sharp leverages newer PHP syntax and optimizations. Always check the [Sharp documentation](http://sharp.code16.fr/docs) for the latest compatibility notes before upgrading.
Can I use Sharp with existing Eloquent models, or do I need to create new ones?
Sharp is **data-agnostic** and works with existing Eloquent models out of the box. You can define content models as PHP classes (e.g., `PostEntity`) that mirror or extend your Eloquent models, reducing boilerplate. This makes it easy to integrate with your existing database schema without duplication.
How does Sharp handle authorization? Does it work with Laravel’s gates/policies?
Sharp integrates seamlessly with Laravel’s **gates, policies, and middleware** for authorization. You can apply existing auth logic to CMS actions (e.g., `create`, `update`, `delete`) without rewriting rules. It also supports role-based access control (RBAC) via Laravel’s built-in systems like Sanctum or Passport.
Is Sharp suitable for headless CMS use cases, or does it require a frontend?
Sharp is **frontend-agnostic** and works perfectly for headless CMS scenarios. Since it’s API-driven (PHP-only), you can manage content via its RESTful endpoints or GraphQL (if integrated) without needing the Inertia.js admin panel. The UI is optional and only required for manual content management.
How does Sharp compare to Filament or Nova for Laravel admin panels?
Sharp differs from Filament/Nova by focusing on **structured data management** (e.g., blog posts, products) rather than full-fledged admin dashboards. It’s **code-driven, data-agnostic, and requires no frontend code**, while Filament/Nova are more opinionated with Blade/Inertia-based UIs. Sharp is ideal if you need a lightweight, API-first CMS layer.
Can I customize Sharp’s UI beyond the default Inertia.js components?
Sharp provides **default React/Vue components** via Inertia.js, but deep UI customization requires overriding or extending its core components. While the package prioritizes convention (e.g., form layouts, tables), you can replace individual parts like buttons, modals, or icons. For radical changes, you may need to fork or rebuild components.
Does Sharp support multi-tenancy or workflow approvals (e.g., draft/publish)?
Sharp supports **multi-tenancy** via Laravel’s built-in features (e.g., middleware, query scopes) and can implement workflows like draft/publish using **custom commands or entity lifecycle hooks**. For approvals, you’d typically extend Sharp’s validation or authorization logic with Laravel’s gates/policies or a package like `spatie/laravel-activitylog`.
How do I migrate from Sharp v8 to v9? Are there breaking changes?
Migrating from Sharp v8 to v9 involves **breaking changes**, including updates to the config builder, middleware system, and icon handling. The [Sharp documentation](http://sharp.code16.fr/docs) outlines a migration guide, but plan for a dedicated phase to test changes in a staging environment. Key areas to review: entity definitions, Inertia.js props, and custom middleware.
Can Sharp work with non-Eloquent data sources (e.g., APIs, NoSQL)?
Yes, Sharp is **data-agnostic** and can work with any structured data source. While it’s optimized for Eloquent, you can adapt it to APIs (e.g., via Laravel’s HTTP clients) or NoSQL (e.g., MongoDB with a custom repository) by implementing Sharp’s `Entity` interface. This requires wrapping your data in a Sharp-compatible class.
What’s the performance impact of using Sharp with Inertia.js in production?
Sharp’s Inertia.js integration adds minimal overhead for CRUD operations, but **large datasets or complex queries** may benefit from caching. You can cache entity lists, search results, or filtered collections using Laravel’s cache drivers. For high-traffic CMS sections, optimize queries with Eloquent scopes or database indexing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
croct/coding-standard
croct/plug-php
nqxcode/phpmorphy
boundwize/pyrameter
testo/facade
headercat/phpstan-extension-ide-helper
develia/commons
dmstr/symfony-system-resources-bundle
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
renatomarinho/laravel-page-speed
develia/geo-bundle
austinheap/laravel-database-encryption
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable