tomatophp / filament-translation-component
Translation Component as a key/value to use it with Spatie Translatable FilamentPHP Plugin
Fund package maintenance!
3x1io
Installs: 34 924
Dependents: 11
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 5
Open Issues: 0
Requires
- php: ^8.2|^8.3|^8.4
- filament/filament: ^4.0
- lara-zeus/spatie-translatable: ^1.0
- tomatophp/console-helpers: ^1.1
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- pestphp/pest-plugin-livewire: ^3.0
- pestphp/pest-plugin-type-coverage: ^3.5
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
README
Filament Translation Component
Translation Component as a key/value to use it with Spatie Translatable FilamentPHP Plugin
Screenshots
Installation
composer require tomatophp/filament-translation-component
Using
you can use the component on your form like this
use \TomatoPHP\FilamentTranslationComponent\Components\Translation; Translation::make('title') ->label('Title')
you can change the language from the config file.
Convert input to textarea
use \TomatoPHP\FilamentTranslationComponent\Components\Translation; Translation::make('title') ->label('Title') ->textarea()
Publish Assets
you can publish config file by use this command
php artisan vendor:publish --tag="filament-translation-component-config"
you can publish languages file by use this command
php artisan vendor:publish --tag="filament-translation-component-lang"
Testing
if you like to run PEST
testing just use this command
composer test
Code Style
if you like to fix the code style just use this command
composer format
PHPStan
if you like to check the code by PHPStan
just use this command
composer analyse
Other Filament Packages
Checkout our Awesome TomatoPHP