Download the PHP package unexpectedjourney/filament-toolbox without Composer

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

Filament Toolbox

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

Filament Toolbox is a collection of components for the Filament ecosystem.

Installation

You can install the package via composer:

Components

Heading and Detail Column

The Heading and Detail Column is a way to display two separate values in the same column. This can be done natively in Filament with a TextColumn and description() but it lacks some features like built in limiting of the detail and automatic tooltips when either the heading or detail is limited.

Usage

Create a HeadingDetailColumn just like you would a TextColumn and chain a call to detail() to provide the detail contents.

To control exactly what content shows in the heading you may use the heading() method.

Use the limit() or words() methods to apply a limit to the number or characters or words displayed in both the heading and detail. The column detects when the limit is applied and adds a Tooltip with the full content when necessary.

Use the limitHeading(), wordsHeading(), limitDetail(), and wordsDetail() methods to limit the number of characters or words displayed in the heading or detail separately. Tooltips will be intelligently added as needed.

If you do not want tooltips displayed you can disable them using the showTooltipsWhenLimited() to handle display for tooltips for both the heading and detail or by using showHeadingTooltipWhenLimited() and showDetailTooltipWhenLimited() methods to manage tooltips for the heading and detail respectively.

Flag Column

The Flag column is used to display boolean icons for a number of true/false values on your model. Similar results can be had using Filament's built in IconColumn but the Flag Column has some extra features like tooltips or urls for each icon and displaying the icons in a grid.

Usage

Preparing your model

Your model needs an attribute that returns an array where the keys are the name of the flag and the values are the active state. This can be a JSON column or a custom Attribute getter.

Add the column

Add the FlagColumn to your columns array and call flags() passing an array of Flags to it. Each Flag must have a name that corresponds to the name of a flag in the column's state and an optional icon name for display.

Note: If the name used when making the flag does not exist as a key in the column's state, it will be considered inactive.

You may specify the icon used by using the dedicated icon() method if you prefer. Where ever you specify the icon you may pass a closure instead of a string. Using Filament's magic closures, add $active as one of the arguments to get the active state of the flag .

Customizing the display order

The flags are displayed in the order they appear in the flags() method and by default flags that are inactive are hidden.

Showing inactive flags

To show all flags including inactive, use the showInactive() method on the FlagColumn itself.

Showing or hiding inactive flags can also be done on a per-flag basis by calling showWhenInactive(). You may pass a closure to conditionally show the icon if it's inactive.

Note: Using showWhenInactive() on a flag will override showInactive() called on the FlagColumn.

Changing the colors

By default, active flags will use the primary color of your Filament theme and inactive flags will use a gray color. You may change this for the entire FlagColumn or on each specific flag by calling the activeColor() and inactiveColor() methods.

Note: Colors defined on a flag will override colors defined on the FlagColumn.

Default icons

If an icon is not specified for a flag a default icon will be used. The default active icon is 'heroicon-o-check-circle' and the default inactive icon is 'heroicon-o-x-circle'. Call the 'activeIcon()' and 'inactiveIcon()' methods on the FlagColumn to set their respective icons.

Customizing the grid

By default, the FlagColumn displays the flags in a grid of 3 icons. This is controlled much the same way that Filament layout components like Filament\Tables\Columns\Layout\Grid control their grid. Call the columns(). Refer to Filament's documentation for further details: https://filamentphp.com/docs/3.x/tables/layout#controlling-column-width-using-a-grid



##### Tooltips
Tooltips are hidden by default but can be shown for all flags calling the `showTooltips()` method on the `FlagColumn`. 

Tooltips are a title cased string automatically generated from the name of the flag. You may specify your own tooltip by calling the `tooltip()` method on an individual flag. You may pass a closure to this method and access the active state of the flag by adding an `$active` argument.

Note: Tooltips will always be displayed for a flag when it is explicitly set even if the `FlagColumn` is not configured to show tooltips.

##### Urls
Each individual flag can optionally be a link. Call the `url()` method on the flag to turn it into a link. This method accepts a string or a closure. You have access to the active state of the flag by adding an `$active` argument to your closure.

You can open urls in a new tab by setting the `openInNewTab` parameter of the `url()` method or by calling the dedicated `openUrlInNewTab()` method on the flag.

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [Rhiannon Journey](https://github.com/rhiannonjourney)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

All versions of filament-toolbox with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/filament Version ^3.0
spatie/laravel-package-tools Version ^1.15.0
illuminate/contracts Version ^10.0|^11.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 unexpectedjourney/filament-toolbox contains the following files

Loading the files please wait ....