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

Figure widget

This widget is intended to display a single figure, with an optional evolution indicator.

Attributes (setters)

$widgetsContainer->addWidget(
    SharpFigureWidget::make('sales')
        ->setTitle('Total sales in €')
        ->setLink(LinkToEntityList::make('orders')->addFilter(StateFilter::class, 'confirmed'));

Note that the setLink() method is expecting a LinkTo... instance.

Data valuation

Valuation is handled by a dedicated $this->setFigureData(string $figureWidgetKey, string $figure, ?string $unit = null, ?string $evolution = null) in the Dashboard class:

class MyDashboard extends \Code16\Sharp\Dashboard\SharpDashboard
{
    // [...]
    
    public function buildWidgetsData(): void
    {
        $this->setFigureData('sales', 135, 'k€', '+3%');
    }
}

Of course in a real word project you would probably fetch the data from your database, and compute the evolution from a comparison period. The fourth parameter, $evolution, is optional and will display a green figure with a ↑ when starting with a +, and a red figure with a ↓ when starting with a - sign.

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.
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
leek/filament-subtenant-scope