Download the PHP package djstarcom/nova-astrotranslatable without Composer
On this page you can find all versions of the php package djstarcom/nova-astrotranslatable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nova-astrotranslatable
Nova Astrotomic Translatable
This Laravel Nova field allows you to make any input field astrotomic/laravel-translatable compatible and localisable.
It is made from a fork from Optimist Digital's Laravel Nova Translatable field, which is tailored for the Spatie Laravel Translatable package - so huge thanks to them, 99% of the work was made by them!
Requirements
php: >=8.0
,laravel/nova: ^4.0
astrotomic/laravel-translatable: ^11.5
Features
- Supports almost all fields (including third party ones)
- Supports default validation automatically
- Simple to implement with minimal code changes (after
astrotomic/laravel-translatable
support) - Locale tabs to switch between different locale values of the same field
Known non-working fields
Image
andFile
Limitations
- The following methods can not be used, as this package uses them internally:
resolveUsing
fillUsing
displayUsing
(might be fixed eventually)
Screenshots
Installation
Firstly, set up astrotomic/laravel-translatable.
Install the package in a Laravel Nova project via Composer:
Usage
Call ->translatable()
on any field, like so:
Validation
It's possible to define locale specific validation rules.
To do so, add the ->rulesFor()
on your field and the HandlesTranslatable
trait to your Nova resource.
->rulesFor
accepts array|string|callable
locales and array|callable
rules.
In this example, rules will be added to the following values
Configuration
You can define default locales for all the translatable
fields in the config file. The config file can be published using:
Credits
License
This project is open-sourced software licensed under the MIT license.
All versions of nova-astrotranslatable with dependencies
astrotomic/laravel-translatable Version ^11.5
laravel/nova Version ^4.0
nova-kit/nova-packages-tool Version ^1.0