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

Text

Class: Code16\Sharp\Show\Fields\SharpShowTextField

Configuration

setLabel()

Set the field label.

collapseToWordCount(int $wordCount)

Collapse the text if too long, and add a "show more" link. Use it for long texts (even markdown formatted) in sections with only one field.

doNotCollapse()

Reset the collapse configuration.

setHtml(bool $html = true)

By default, the text is escaped. If you want to display HTML, set this to true.

setSanitizeHtml(bool $sanitizeHtml = true)

HTML sanitization is enabled by default for text fields (to prevent XSS attacks when displaying the show). To disable it, call ->setSanitizeHtml(false).

allowEmbeds(array $embeds)

This method expects an array of embeds that could be inserted in the content, declared as full class names. An embed class must extend Code16\Sharp\Form\Fields\Embeds\SharpFormEditorEmbed.

The documentation on how to write an Embed class is available here.

Transformer

For markdown-formatted texts, be sure to use the built-in MarkdownAttributeTransformer:

function find($id): array
{
    return $this
        ->setCustomTransformer(
            'description', 
            new MarkdownAttributeTransformer()
        )
        ->transform([...]);
}
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.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
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