DEV3 Technologies home

Filament code snippets

Admin panel widgets, resources and actions. 25 free snippets, each with an explanation and usage notes.
25
snippets

All snippets

Filament · AuthenticationFilament TOTP two-factor authentication with recovery codesEnable authenticator-app two-factor login in a Filament 4 panel: provider setup, encrypted secret columns and recovery codes on the user.filament2fatotp Filament · NavigationFilament multi-tenancy with a team switcher menuScope a Filament 4 panel to the current team, let users switch teams from a menu, create new ones and remember the last team used.filamentmulti-tenancyteams Filament · Dashboard widgetsFilament stats overview with sparkline trendsA Filament 4 dashboard widget where each stat card shows a 14 day sparkline, a percent change description and a trend colour.filamentdashboardstats Filament · FormsFilament settings page backed by a key-value tableA custom Filament 4 page with a form that loads and saves store settings from a simple key-value model, with a success toast.filamentsettingspage Filament · InternationalisationFilament Arabic and English locale switch with RTL layoutLet Filament 4 users switch between English and Arabic from the user menu, remembered in the session and profile, with the layout flipping to RTL.filamenti18nrtl Filament · TablesFilament resource list with status tabs and filtersA Filament 4 list page with query-backed status tabs showing live counts, plus select and toggle table filters on the same resource.filamenttabsfilters Filament · TablesFilament order items relation manager with totalsA Filament 4 relation manager for order lines: product select fills the price, a footer sums the column, and the order total is recalculated.filamentrelation-managerorders Filament · LayoutsFilament order detail infolist with line itemsA read-only order view for Filament 4 using an infolist: status badge, customer block, repeatable item lines and a bold money total.filamentinfolistorders Filament · NotificationsFilament notifications with action buttonsSend a Filament 4 database notification with View and Acknowledge buttons, mark-as-read behaviour and a one-time signed link.filamentnotificationsactions Filament · NavigationFilament navigation badge showing a pending countShow a cached count of items awaiting action as a coloured badge on a Filament 4 sidebar entry, with a tooltip and a hide-when-zero rule.filamentnavigationbadge Filament · LayoutsFilament multi-panel setup: admin, vendor and customerThree Filament 4 panel providers sharing one app, each with its own path, colour, login and discovery folders for resources and pages.filamentpanelsmulti-panel Filament · ChartsFilament monthly revenue chart with year filterA Filament 4 line chart widget that totals paid invoices per month for a selectable year, filling empty months with zero.filamentchartrevenue Filament · LayoutsFilament kanban board page with drag and dropA custom Filament 4 page that renders stage columns and moves cards between them with Alpine drag and drop and a validated Livewire method.filamentkanbanlivewire Filament · AuthenticationFilament impersonate user action with exit bannerA Filament 4 table action that signs staff in as another user, records the original admin in the session and offers a one-click return.filamentimpersonationsupport Filament · SearchFilament global search with relation fields and quick actionsConfigure Filament 4 global search for a resource: searchable columns across relations, result details, eager loading, a result limit and actions.filamentglobal-searchresource Filament · UtilitiesFilament export action with a custom exporterA Filament 4 exporter class with formatted columns and a custom completion message, plus the list-page header and bulk export actions.filamentexportcsv Filament · FormsFilament dynamic field repeater and runtime rendererLet admins define custom form fields in a Filament 4 repeater with type-aware options, then render those definitions as real form inputs.filamentrepeaterdynamic-form Filament · TablesFilament date range table filter with presetsA reusable Filament 4 table filter with From and Until date pickers, quick presets, safe query building and readable filter chips.filamentfiltersdate-range Filament · ThemingFilament custom panel theme with neutral paletteBrand a Filament 4 panel with a custom Tailwind theme stylesheet, a neutral colour palette, a web font, a logo name and dark mode defaults.filamentthemetailwind Filament · UploadsFilament CSV import header action with row validationA Filament 4 header action that uploads a CSV, validates each row, upserts valid ones in chunks and reports imported and skipped counts.filamentcsvimport Filament · FormsFilament create page as a multi-step wizardTurn a Filament 4 create record page into a step-by-step wizard with per-step validation, dependent fields, a skippable step and a confirm step.filamentwizardcreate-record Filament · PermissionsFilament canAccessPanel role guard on the user modelDecide which Filament 4 panel each user may open with a role enum and canAccessPanel, including active and approval checks.filamentrolespanels Filament · Queue jobsFilament bulk action with confirmation and queued batchA Filament 4 bulk action that asks for confirmation, then fans the selected rows into a queued job batch and notifies the user when it finishes.filamentbulk-actionqueue Filament · PermissionsFilament approve and reject actions with reasonReusable Filament 4 table actions that approve or reject pending records, require a reason on rejection and guard the state transition.filamentworkflowapproval