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

Code-driven CMS framework for Laravel (PHP 8.3+/Laravel 11+). Build admin/CMS sections with a clean UI and strong DX: CRUD with validation, search/sort/filter, bulk or custom commands, and authorization—no front-end code required, data-agnostic.

View on GitHub
Deep Wiki
Context7

Upgrading from 5.x to 6.x

This version brings more breaking changes than the previous ones, since we decided to clean up old code parts and to fully embrace PHP 7.x type hinting.

Laravel 7+ and php 7.4+ required

It's not a BC, but still, minimal requirements are now these.

Type hinting everywhere

In order to reinforce the API, we decided to use PHP type hinting everywhere (well, almost everywhere). This means that you'll have to add parameters and return types on EntityLists, Forms, Shows, Filters, Commands, EntityStates...

Sharp URLs changed

Not sure it's really a BC, unless you use direct links to a Sharp EntityList, Show, or Form in a notification for instance. Anyways all URLs changed as a consequence of the new breadcrumb feature.

LinkToEntity must be replaced by LinkTo[XXX] classes

The 5.0 LinkToEntity class has been removed in favor of:

  • LinkToEntityList
  • LinkToForm
  • LinkToShowPage
  • LinkToSingleForm
  • LinkToSingleShowPage

See related documentation.

SharpWidget::setLink() changed its parameters

This method is now expecting a LinkTo[XXX] instance.

    SharpPanelWidget::make("activeSpaceships")
        ->setInlineTemplate("<h1>{{count}}</h1> spaceships in activity")
        ->setLink(LinkToEntityList::make("spaceship"));

The Closure of SharpOrderedListWidget::buildItemLink() changed its parameters

In order to use the new LinkTo[XXX] classes, the Closure is now expected to either return a string (URL) or a LinkTo[XXX] instance.

    SharpOrderedListWidget::make("widget")
        ->buildItemLink(function($item) {
            return LinkToEntityList::make("entity")->addFilter("type", $item['id']); 
        });

SharpContext was removed in favor of CurrentSharpRequest

The Code16\Sharp\Http\Context\SharpContext class and the Code16\Sharp\Http\WithSharpContext trait were removed. If you need to know the current context, use the new Code16\Sharp\Http\Context\CurrentSharpRequest class, documented here.

Deprecated filter classes were removed

EntityListFilter, EntityListMultipleFilter, EntityListRequiredFilter, DashboardFilter, DashboardRequiredFilter, DashboardMultipleFilter, which were deprecated in 5.x, were removed (and replaced by EntityLostSelectFilter, EntityListSelectMultipleFilter, EntityListSelectRequiredFilter ...).

SharpUploadModelAttributeTransformer class was removed

I was used to EntityList as an attribute transformer in EntityList, for SharpUploadModel. In 6.x, you should used in replacement:

->setCustomTransformer("picture", (new SharpUploadModelThumbnailUrlTransformer(100))->renderAsImageTag())

sharp_markdown_thumbnails() helper is now deprecated

Replaced by sharp_markdown_embedded_files(), to take benefit of the feature of file embeds in the Markdown field (see documentation).

EntityState color const are deprecated

PRIMARY_COLOR, SECONDARY_COLOR, ... are deprecated. For the primary color, use the new config config('sharp.theme.primary_color').

For other legacy colors, replace with the following hex code:

Const Color Hex
PRIMARY_COLOR "#5596E6"
SECONDARY_COLOR "#FD7400"
GRAY_COLOR "#8C9BA5"
LIGHTGRAY_COLOR "#EFF2F5"
DARKGRAY_COLOR "#394B54"
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.
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament