dejwcake / craftable-translatable
Make your Eloquent models and other content translated into multiple languages
0.9.0
2023-05-06 23:58 UTC
Requires
- php: ^8.1
- ext-json: *
- laravel/framework: ^10.0
- spatie/laravel-translatable: ^6.0
Requires (Dev)
- orchestra/testbench: ~8.5
- phpunit/phpunit: ^10.1
This package is auto-updated.
Last update: 2024-11-07 03:35:10 UTC
README
Translatable makes your content translatable in defined languages (locales). To sum up, the package:
- publishes a config, that defines locales (languages) used in your project,
- introduces a
HasTranslations
trait that makes your Eloquent model translatable (extendingspatie/laravel-translatable
), - introduces a
TranslatableFormRequest
class that you can use as a base class for your Request classes to extend from, which simplify the definition of the rules for translatable data.
You can find full documentation at https://docs.getcraftable.com/#/translatable
Run tests
To run tests use this docker environment.
docker-compose run -it test vendor/bin/phpunit
To switch between postgresql and mariadb change in docker-compose.yml
DB_CONNECTION environmental variable:
- DB_CONNECTION: pgsql
+ DB_CONNECTION: mysql