Download the PHP package fnx-software/filament-astrotomic without Composer

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

Filament Astrotomic Translations

Total Downloads

This package is an extension for Filament v5 and laravel-translatable to easily manage multilingual content in your admin panel.

For Filament v4, use an older compatible release/tag.

This is an enhanced fork of doriiaan/filament-astrotomic and the original cactus-galaxy/filament-astrotomic, updated for Filament 5 and introducing powerful new features like a reactive LocaleSwitcher, dedicated components for displaying translated content, and translated relationship selects with custom option labels.

CleanShot 2025-09-29 at 12 02 44@2x

Installation

You can install the package via Composer:

Publish the configuration for astrotomic/laravel-translatable:

Configure the locales your app should use in config/translatable.php:

Setup

Adding the Plugin to a Panel

Register the plugin in your Panel Provider:

Customizing the Main Locale

By default, the main locale is taken from your config/translatable.php file. You can override this dynamically when registering the plugin.

Set a static main locale:

Set a dynamic main locale:

Customizing the Available Locales

By default, available locales are loaded from config/translatable.php.

You can override the locale list when registering the plugin. This is useful when locales are stored in a database, tenant settings, or any other runtime configuration.

Basic Usage

1. Preparing Your Model

Make your Eloquent model translatable as described in the astrotomic/laravel-translatable documentation.

2. Preparing Your Resource

Apply the ResourceTranslatable trait to your Filament resource class:

3. Making Resource Pages Translatable

Apply the corresponding translatable trait to each resource page.

List Page

Create Page

Edit Page

View Page

Form Components

TranslatableTabs for Localized Fields

To manage translations for your model's attributes, use the TranslatableTabs component. It automatically creates a tab for each locale.

CleanShot 2025-09-29 at 12 03 33@2x

Customizing Field Labels

Use makePrefixLabel() and makeSuffixLabel() on the TranslatableTab object to add the locale name to labels.

Custom Locales Per TranslatableTabs Instance

By default, TranslatableTabs uses the locales configured for the plugin, or the translatable.locales config.

You can override locales for a specific form section:

TranslatableSelect for Relationships

The standard Select::relationship() component does not work reliably with astrotomic/laravel-translatable when the display attribute is translated.

For example, if the related model has a translated name attribute, the name column usually lives in the translation table, not the base table. This means a normal relationship select may try to select a missing column such as countries.name.

This package provides a TranslatableSelect component to correctly load, search, and display options from a translatable BelongsTo relationship.

This will display the translated country name in the current locale and search through the translated name attribute.

Custom Translated Option Labels

Sometimes the option label is not a single translated attribute. For example, a Person label may need to combine several translated fields:

Use translatableLabelUsing() to customize the displayed label.

Searching Multiple Translated Attributes

When using a custom label, you may also define multiple translated attributes to search.

Filtering or Ordering the Related Query

You may pass a query modifier as the third argument to translatableRelationship().

Available Methods

Method Description
translatableRelationship(string $relationship, string $titleAttribute, ?Closure $modifyQueryUsing = null) Defines the related model relationship and fallback translated display attribute.
translatableLabelUsing(?Closure $callback) Customizes the option label using the related record and active locale.
translatableSearchAttributes(array $attributes) Defines one or more translated or base-table attributes to search.

Displaying Translated Content Reactively

This package provides a seamless way to view translated content on List and View pages using a LocaleSwitcher action that works with dedicated table columns and infolist entries.

1. Add the LocaleSwitcher Action

Add the LocaleSwitcher to the header actions of your List and View pages.

CleanShot 2025-09-29 at 12 04 48@2x

2. Use TranslatableColumn in Tables

The TranslatableColumn automatically displays the translation for the selected locale and provides out-of-the-box search and sort functionality.

3. Use TranslatableEntry in Infolists

Use TranslatableEntry in infolists to display translated content that reacts to the LocaleSwitcher.

Single Locale Optimization & Customization

Automatic Grid View

When your application or a specific tenant only has one locale active, TranslatableTabs automatically switches its layout to a standard grid.

This removes the unnecessary tab bar and renders fields directly. It gives a cleaner UI for single-language contexts without requiring code changes.

Forcing Tabs Layout

If you prefer to always show language tabs, even when only one locale is available, you can force the layout globally or per component.

Global Configuration

Per-Component Configuration

Custom Locales for Switcher

You can define specific locales for the LocaleSwitcher action, overriding global or tenant configuration.

Advanced Usage

Custom Locales Per Resource

Override getTranslatableLocales() in your resource to specify a different set of locales than the global configuration.

Modal Forms

To use translatable fields inside modal actions, such as an EditAction on a table row, you must correctly mutate the data.

Nested Relationship Support

TranslatableColumn and TranslatableEntry support displaying translated attributes on nested relationships using dot notation.

Search support is available for relationship paths handled by the component.

Sorting support is currently limited and should be considered supported for direct attributes and simple relationship cases only.

TranslatableColumn with a Relationship

TranslatableEntry with a Relationship

Testing

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Credits

License

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


All versions of filament-astrotomic with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3|^8.4
astrotomic/laravel-translatable Version ^11.16
filament/filament Version ^5.0
filament/forms Version ^5.0
filament/tables Version ^5.0
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 fnx-software/filament-astrotomic contains the following files

Loading the files please wait ...