Download the PHP package dowhile/filament-tweaks without Composer

On this page you can find all versions of the php package dowhile/filament-tweaks. 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 filament-tweaks

Filament Tweaks

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

An opinionated collection of defaults for Filament panels — the settings you would otherwise copy into every project by hand.

It applies sensible global defaults (non-native selects, striped tables, centered form actions, translated labels, date/time and currency formats), ships a handful of macros and reusable filters, and includes CSS fixes for RTL panels. Every tweak is a config flag, so you can turn off anything you disagree with.

Installation

Install the package via composer:

Register the plugin on any panel you want it applied to:

Optionally publish the config file:

Panel defaults

These are applied to every panel the plugin is registered on, and are not configurable:

If joaopaulolndev/filament-edit-profile is installed, its edit_profile_form, edit_password_form and browser_sessions_form Livewire components are aliased so they can be rendered by name.

Features

Each feature is toggled by a key under features in config/filament-tweaks.php.

Key Default What it does
sidebar_collapsible_on_desktop true Enables sidebarCollapsibleOnDesktop().
disable_readonly_relation_managers true Relation managers on view pages stay editable.
hide_relation_managers_on_edit_pages false Edit pages show no relation managers, as if every page returned [] from getRelationManagers(). Accepts true or a list of panel IDs. See Relation managers on edit pages.
center_form_actions true Centers form actions and modal footer actions.
disable_create_another true Removes "create another" from CreateRecord, CreateAction, AttachAction and AssociateAction.
translate_labels true Calls translateLabel() on actions, columns, fields, entries, filters, sections, tabs, steps and groups; also runs section and empty-state headings through __().
non_native_select true Select and SelectFilter use native(false).
configure_datetime_picker true DateTimePicker without seconds, week starting on Sunday.
configure_table_styling true Tables are striped, columns reorderable, filters and column manager applied immediately, 25 rows per page.
show_pagination_overview_on_small_screens true Keeps the pagination results overview ("Showing X to Y of Z results") visible on a centered row when the pagination bar is narrow.
enable_rich_editor_toolbar_buttons true A fuller RichEditor toolbar (headings, alignment, sub/superscript, tables, code blocks, undo/redo).
customize_system_icons false Swaps the sidebar collapse/expand icons for heroicon-o-bars-3* variants.
enable_all_columns_toggleable true Registers the allColumnsToggleable() table macro.
enable_currency_mask true Registers the currencyMask() text input macro.
enable_autogrow_textarea true Registers the autogrow() textarea macro.
configure_date_range_picker true Configures malzariey/filament-daterangepicker-filter when installed.

Formats

Uncomment any of these to set panel-wide display defaults. Each one is skipped when left unset:

date, time, datetime and currency are applied to both Table and Schema defaults; timezone is passed to FilamentTimezone::set().

Relation managers on edit pages

This one is off by default — it changes what existing pages render, so you opt in:

Once enabled, every EditRecord page of those panels behaves as if it declared:

Relation managers keep showing up on view pages and on ManageRelatedRecords pages — only edit pages are emptied. It is implemented as a Livewire component hook, so no page or resource needs to be touched.

A page opts out in either of two ways:

The opt-out is detected per page class: declaring getRelationManagers() on the page (or on your own base edit page class) is enough to be left alone.

Macros

A column keeps the last word wherever allColumnsToggleable() is called from: one that declares ->toggleable(isToggledHiddenByDefault: true) still starts hidden, and one that declares ->toggleable(false) stays out of the column manager. A hidden column — including one whose ->visible() is decided per record — is never toggleable, which is Filament's own rule.

Used panel-wide, a condition is still evaluated per table, but the default it switches on covers every table built after it in the same request. Call the macro after ->columns([...]) when the condition has to be answered per table.

IDE completion

Macros are registered at runtime, so editors cannot see them on their own. The package ships an ide.php stub file that declares them; VS Code (Intelephense) and PhpStorm index vendor/ automatically, so completion for the macros works with no setup. The file is never autoloaded and every declaration in it sits behind if (false), so PHP never executes it.

The macros are registered by the package's service provider, not by the plugin, because they live on the component classes rather than on a panel. A plugin only boots on a request that goes through a panel, so registering them there would leave them undefined in tests, console commands and queued jobs — the macro would exist or not depending on whether something had already hit a panel route in that process.

Filters

Both filters render an active indicator built from the filter label. Note that RangeFilter currently uses hard-coded Hebrew labels for its min/max inputs.

Navigation icons

HasActiveNavigationIcon derives the active icon from the regular one by swapping the outline heroicon for its solid variant (heroicon-o-users → heroicon-s-users):

Dowhile\FilamentTweaks\Pages\Dashboard is a drop-in Filament dashboard with the trait already applied.

Styling

A stylesheet is registered automatically with the panel. It covers:

When the date range picker filter package is installed, a second stylesheet fixes its RTL layout (calendar direction, arrows, ranges panel and buttons).

When show_pagination_overview_on_small_screens is enabled (the default), a small inline <style> block is injected into the panel head (via a HEAD_END render hook) that turns the pagination nav into a size container and re-shows the results overview on its own centered row once the bar drops below 56rem.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-tweaks with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^4.0|^5.0
marcelweidum/filament-expiration-notice Version ^1.0.13
spatie/laravel-package-tools Version ^1.15.0
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 dowhile/filament-tweaks contains the following files

Loading the files please wait ...