Search by

atannex / panels

Atanga1920

Many back-office panels in one Laravel app: one panel per system on its own host, a control panel over all of them, host-aware routing and URLs, a panel switcher, and cached panel summaries refreshed on the queue so an overview never builds every panel live.

Package info

github.com/atannex/panels

pkg:composer/atannex/panels

Statistics

Installs: 17

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-11-09 11:27 UTC

This package is auto-updated.

Last update: 2026-11-09 11:31:26 UTC


README

Many back-office panels in one Laravel app. Each system gets its own panel on its own host, and a control panel oversees them all. Panel routes move to their own host, route() URLs point there directly, a switcher lists the panels a person may enter, and an overview reads cached summaries rather than building every panel.

use Atannex\Panels\Facades\Panels;
use Atannex\Panels\Panel;

Panels::register(
    Panel::make('control')->control()->label('Control')
        ->host('atannex.com')->home('/panels/dashboard')->routes(['panels.*'])
        ->access(fn ($user) => $user->can('panel.admin')),

    Panel::make('news')->label('News')->accent('#b91c1c')->icon('newspaper')
        ->host(fn () => config('hosts.news'))->home('/panels/newsroom')
        ->routes(['panels.newsroom.*', 'panels.media.*'])
        ->desks([NewsroomDesk::class, MediaDesk::class])
        ->access(fn ($user) => $user->can('panel.newsroom'))
        ->summary(NewsSummary::class),
);

Add panels.resolve to the web middleware group. Point URLs at each panel's host with URL::formatHostUsing(fn ($root, $route) => Panels::root($root, $route)), combined with any root callback the app already has. Schedule panels:refresh so summaries are ready before anyone opens the overview.

Access is denied by default: a panel without access() admits no one.