Download the PHP package bensondevs/fiddy without Composer

On this page you can find all versions of the php package bensondevs/fiddy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fiddy

Fiddy

Tests License: MIT

Filament Interactive and Descriptive Display — rich Image, Title, and Description components for Filament 5.

Fiddy layers presentation (avatar, title, description, hint, icons) on top of familiar Filament forms, infolists, tables, and filters — with one shared Content / Option model and a single presenter for everything.

Table of contents

Installation

Requires Filament ^5 and PHP ^8.2.

The service provider and assets register automatically.

If the app uses Laravel Boost, run php artisan boost:install (or boost:update) after requiring Fiddy. Boost discovers this package’s AI guidelines and the fiddy-development skill automatically — no extra registration.


Forms

Select

FiddySelect renders rich HTML options: image, title, description, hint, and icons — from parallel arrays, associative payloads, relationships, presenters, or FiddyComponentsPresentable. Agents using Laravel Boost should load the fiddy-development skill for the full Option / Content API.

Without a presenter or presentable model, Fiddy guesses name|title, email|description, phone|hint, and Spatie Media Library default collection when available.

Presentation methods

Same priority as Presentation:

Method Input Behavior
presentOptionUsing(?Closure $callback) Closure returning Option Highest priority. See injections below.
presentUsing(?string $presenter) Class-string of PresentsOption (typically a Presenter subclass) new $presenter($record)->toOption()
(none) Model implements FiddyComponentsPresentable asOption()
(none) Plain model / enum OptionGuesser::from(...) or Filament enum contracts

presentOptionUsing closure arguments

Fiddy injects the related / option model being presented:

How Parameter Value
By name $record Related model
By name $related Same related model
By type Model / concrete class Related model

The closure must return an Option instance.

Static option helpers

Keyed like options(); each accepts array|Arrayable|Closure|null:

Option fluent API

Build dropdown rows with Option::make($value) inside closures, toOption(), or asOption(). Icons accept string | BackedEnum | Htmlable | null.

Method Notes
value($value) Option key
title(?string) Primary label
description(?string, $icon = null) Optional 2nd arg sets description icon
hint(?string, $icon = null) Optional 2nd arg sets hint icon
image / prefixImage / suffixImage Image URLs
circularImage(bool = true) Round media
imageWidth / imageHeight / imageSize Explicit image size
maxImageWidth / maxImageHeight Caps (default 2rem)
disabled(bool\|Closure = true) Disable the option
tooltip(string\|Htmlable\|null) Hover text
icon / prefixIcon / suffixIcon Leading / trailing icons
titleIcon / titlePrefixIcon / titleSuffixIcon Beside title
descriptionIcon / descriptionPrefixIcon / descriptionSuffixIcon Beside description
hintIcon / hintPrefixIcon / hintSuffixIcon Beside hint

Option has no aboveTitle / aboveDescription (those exist only on Content).

Numeric input

FiddyNumericInput masks thousand separators in the UI while keeping a clean numeric state. Use money() for currency-aware prefixes and separators, and spellAmount() for live spelled helper text.

Repeater

FiddyRepeater extends Filament’s repeater with rich item headers via Fiddy Content: label, description, prefix/suffix icons, and icon color. Closures receive the same injections as Filament’s itemLabel ($state, $key, $index, …). Nested fields used in $state should be live() so headers update as you type.

Method Types Notes
itemLabel Filament string \| Htmlable \| Closure \| null Inherited
itemDescription string \| Closure \| null Secondary line under the title
itemPrefixIcon / itemSuffixIcon string \| BackedEnum \| Htmlable \| Closure \| null Cell icons
itemIconColor string \| array \| Closure \| null Colors both prefix and suffix icons

Infolists

Entry

FiddyEntry shows a related BelongsTo / HasOne record as rich Content — same stack as FiddyColumn (presentUsing, presentContentUsing, presentable asEntryContent(), or attribute guessing). Closure injections and the full Content fluent API match the column docs below.

Image entry

FiddyImageEntry extends Filament’s image entry with click-to-preview (on by default) and soft rounded() corners alongside Filament’s circular(). Images are capped with max-width / max-height (default 8rem) instead of a fixed height; use Filament’s imageWidth() / imageHeight() / imageSize() for explicit sizes, and Fiddy’s maxImageWidth() / maxImageHeight() to change the cap.

Timestamp entry

FiddyTimestampEntry mirrors the FiddyTimestampColumn API (same trait methods, positions, and closure arguments).


Tables

Column

FiddyColumn extends Filament’s TextColumn and renders a related BelongsTo / HasOne model as rich HTML via Content. When no related model is found, the cell shows the placeholder -.

Related record resolution

The column state is the related model, not a scalar attribute. Resolution order:

  1. relatedRecord(Model|Closure|null) — explicit override. A Closure is evaluated with Filament’s usual column injections (including the table row as record) and must return a Model (or null).
  2. Otherwise, if the column name is a BelongsTo / HasOne relation on the row model, that relation’s result is used (FiddyColumn::make('author') → $row->author).
  3. Otherwise, data_get($row, $name) is used (supports dotted paths like author.manager when the value is a Model).

Presentation methods

Same resolution priority as Presentation:

Method Input Behavior
presentContentUsing(?Closure $callback) Closure returning Content Highest priority. See injections below.
presentUsing(?string $presenter) Class-string of PresentsContent (typically a Presenter subclass) Instantiated as new $presenter($relatedModel); calls toContent().
(none) Related model implements FiddyComponentsPresentable Calls asColumnContent().
(none) Plain model Content::guess($related) from conventional attributes.

presentContentUsing closure arguments

Fiddy injects the related model (not the table row) into the closure:

How Parameter Value
By name $record Related model
By name $related Same related model
By type Model Related model
By type Concrete class (e.g. Author) Related model when it matches

Also available via Filament’s normal column evaluation (Livewire component, column instance, etc.).

The closure must return a Content instance (or anything else is treated as empty / placeholder).

Display helpers

Method Input Behavior
circularImages(bool\|Closure $condition = true) Bool or Closure evaluated on the column After content is resolved, forces Content::circularImage() when truthy.
searchable(...) Same signature as Filament TextColumn::searchable When enabled without a custom $query, searches the related model with LIKE on name, title, email, and description.
sortable(...) Same signature as Filament TextColumn::sortable When enabled without a custom $query, orders by related name via a relationship subquery.
filterable(bool $condition = true) Bool Shortcut for searchable(condition: true, isIndividual: true) (per-column search).

BelongsTo / HasOne relations named like the column are eager-loaded automatically when the table query runs.

Note: searchable / sortable use those fixed fallback attribute lists on the related table. Passing $attribute into Content::title(..., $attribute) / description(...) records metadata on the Content object for its own helpers; it does not currently change which columns FiddyColumn::searchable() / sortable() query.

Content fluent API

Build cells with Content::make() inside closures, presenters (toContent()), or asColumnContent() / asEntryContent(). Icons accept string | BackedEnum | Htmlable | null (e.g. Heroicon enums or SVG HTML).

Text

Method Arguments Notes
title(?string $title, ?string $attribute = null) Display text; optional attribute name $attribute stored as title attribute metadata
description(?string $description, ?string $attribute = null) Secondary line; optional attribute Same for description attribute
hint(?string $hint) Tertiary line
aboveTitle(?string $text) Line above the title Used heavily by timestamp columns
aboveDescription(?string $text) Second above-title line

Media

Method Arguments Notes
image(?string $url) Image URL Alias of prefixImage
prefixImage(?string $url) Leading image Prefered over prefix icon when set
suffixImage(?string $url) Trailing image Prefered over suffix icon when set
circularImage(bool $circular = true) Bool Rounds media
imageWidth / imageHeight / imageSize int\|string\|null Explicit size (int → px)
maxImageWidth / maxImageHeight int\|string\|null Caps (default 2rem)

Icons (prefix / suffix pairs; short aliases set the prefix)

Method Alias of
icon(...) prefixIcon(...)
prefixIcon(...) / suffixIcon(...) Leading / trailing cell icon
iconColor(string \| array \| null) Filament color for prefix/suffix cell icons
titleIcon(...) titlePrefixIcon(...)
titlePrefixIcon(...) / titleSuffixIcon(...) Beside the title
descriptionIcon(...) descriptionPrefixIcon(...)
descriptionPrefixIcon(...) / descriptionSuffixIcon(...) Beside the description
hintIcon(...) hintPrefixIcon(...)
hintPrefixIcon(...) / hintSuffixIcon(...) Beside the hint
aboveTitlePrefixIcon(...) / aboveTitleSuffixIcon(...) Beside above-title
aboveDescriptionPrefixIcon(...) / aboveDescriptionSuffixIcon(...) Beside above-description

Content also provides ::guess(Model), ::fromEnum(UnitEnum), and ::resolveImageUrl(Model) (avatar_url, then Spatie Media Library default collection).

Timestamp column

FiddyTimestampColumn formats a datetime attribute as HTML Content: title is the translated datetime (M j, Y g:i A in the column timezone). Optional subject and relative-diff lines attach above or below that title. The same API is shared with FiddyTimestampEntry via FormatsTimestampContent.

Subject and relative difference

Method Input Behavior
describeSubject(string $position = 'bottom') 'bottom' (default), or 'top' / 'above' Shows a subject name line. Defaults description prefix icon to Heroicon::OutlinedUser unless you set descriptionPrefixIcon yourself.
describeDiffForHuman(string $position = 'bottom') Same position values Shows a relative diffForHumans line (full datetime precision, not start-of-day). Default icon is calendar; if subject is off and you set descriptionPrefixIcon, that icon is reused for the diff.
getSubjectUsing(?Closure $callback) Closure → ?Model Resolves who the subject is. Injected: named record (table/infolist row). If omitted, Fiddy soft-resolves an activity-log causer when available.
getSubjectNameUsing(?Closure $callback) Closure → stringable Overrides the displayed name. Injected: record, subject. Default: subject’s name-like attribute, or a localized “system” label.
subjectPhoto(bool\|Closure $condition = true) Bool or Closure When truthy, shows a circular prefix image for the subject.
getSubjectPhotoUsing(?Closure $callback) Closure → ?string URL Custom photo URL. Injected: subject, record. Default: Content::resolveImageUrl($subject).

Position layout when both subject and diff are enabled:

Icon helpers on the timestamp

Method Applies to
titlePrefixIcon(...) / titleSuffixIcon(...) The formatted datetime title
descriptionPrefixIcon(...) / descriptionSuffixIcon(...) Subject (and sometimes diff) description line — setting prefix marks it “explicit” so defaults do not overwrite it

Icon types: string | BackedEnum | Htmlable | null.


Filters

Select filter

FiddySelectFilter reuses the same rich option presentation as FiddySelect (presentUsing, presentOptionUsing, static helpers, enum, presentable asOption()). Dropdown wiring is forwarded to a nested FiddySelect.

Active chips are separate: presentable models use asFilterIndicator() → Indicator; otherwise the relationship title attribute (or enum label/icon via Indicator::fromEnum). Presenters do not affect chips.

Indicator fluent API

Method Notes
Indicator::make(?string $title) Chip label
title(?string) Set / replace label
icon(...) / prefixIcon(...) / suffixIcon(...) string\|BackedEnum\|Htmlable\|null

Presentation

Select, Column, Entry, and filter chips all render from the same Option / Content DTOs. You can fill those three ways: put presentation on the model (or enum), let Fiddy guess conventional attributes, or wire a separate Presenter class.

On the model

Implement FiddyComponentsPresentable. No presentUsing() is needed — Fiddy detects the interface automatically.

Method Used by
asOption() FiddySelect and filter dropdown options
asColumnContent() FiddyColumn
asEntryContent() FiddyEntry
asFilterIndicator() Active FiddySelectFilter chips

Wire components with a relationship (or attribute) only:

Enums can implement the same contract for custom option / content / chip markup.

No presenter, no contract

If the related model has conventional attributes, Fiddy guesses without a presenter or presentable interface:

Enums without FiddyComponentsPresentable still work via Filament HasLabel / HasIcon / HasDescription and ->enum(Status::class).

Separate presenter

Prefer a presenter when presentation should stay off the Eloquent model, or when one class should drive Select, Column, Entry, and filter surfaces together.

Declare the presenter on the model with HasFiddyPresenter — no hand-written asOption / asColumnContent / asEntryContent / asFilterIndicator, and no presentUsing() on each component:

HasFiddyPresenter builds filter chips from the presenter’s toOption() title (and prefix icon when set). Override asFilterIndicator() on the model if chips need different markup.

Or wire the presenter per component with presentUsing() (highest priority after inline closures):

Notes:

You can also pass an inline closure with presentOptionUsing(...) / presentContentUsing(...) when you only need one surface.

Resolution order

Highest priority first:

  1. Inline closure (presentOptionUsing / presentContentUsing)
  2. ->presentUsing(SomePresenter::class) → toOption() / toContent()
  3. Model or enum implements FiddyComponentsPresentable
  4. Attribute / enum-contract guessing

License

MIT


All versions of fiddy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
bensondevs/supercharged-enums Version ^0.2.0
filament/forms Version ^5.0
filament/infolists Version ^5.0
filament/tables Version ^5.0
illuminate/support Version ^12.0|^13.0
squirephp/currencies-en Version ^3.11
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bensondevs/fiddy contains the following files

Loading the files please wait ...