dskripchenko/orchid-extra

Extra Classes For Orchid.

Maintainers

Package info

github.com/dskripchenko/orchid-extra

pkg:composer/dskripchenko/orchid-extra

Transparency log

Statistics

Installs: 3 443

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v2.2.1 2026-07-21 06:46 UTC

This package is auto-updated.

Last update: 2026-07-28 16:47:26 UTC


README

Extra building blocks for the Orchid admin platform — an inline filter factory and base Screen / Layout classes that cut boilerplate.

Packagist License

Requirements

PHP 8.2–8.5 · Laravel 11 / 12 / 13 · Orchid Platform 14.

Install

composer require dskripchenko/orchid-extra

Selection — inline filters

Instead of writing a Filter class per column, build filters inline through the Selection facade:

use Dskripchenko\OrchidExtra\Facades\Selection;

public function filters(): iterable
{
    return [
        Selection::input('Name', 'name'),
        Selection::date('Created', 'created_at'),
        Selection::switcher('Active', 'is_active'),
        Selection::selectFromModel('Author', 'author_id', new User),
        Selection::selectFromQuery('Category', 'category_id', Category::query()->where('active', true)),
        Selection::selectFromOptions('Status', 'status', ['draft' => 'Draft', 'published' => 'Published']),
    ];
}
method purpose
input($name, $field, $operator = 'like') text filter
date($name, $field, $format = 'Y-m-d', $range = true) date / date-range
switcher($name, $field) boolean toggle
selectFromModel($name, $field, Model $entity, $entityName = 'name', $entityKey = 'id') select from a model
selectFromQuery($name, $field, Builder $query, …) select from a query
selectFromOptions($name, $field, array $options) select from a static list

Each is also available as a Filters\Base*Filter class if you prefer subclassing.

Base classes

Extend these to stand up list / edit screens with less setup:

  • Screens\BaseListScreen, Screens\BaseEditScreen, Screens\Screen
  • Layouts\BaseListLayout

License

MIT © Denis Skripchenko