creativeorange / laravel-translatable-and-injectable
v3.0.1
2024-08-19 09:14 UTC
Requires
- php: >=8.0.2
- creativeorange/laravel-injectable: ^3
- illuminate/support: ^9|^10|^11
- spatie/laravel-translatable: ^5.2|^6
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-12-19 10:05:33 UTC
README
For explanation see Laravel Injectable package
Installation
You can install the package via composer:
composer require creativeorange/laravel-translatable-and-injectable
For support for Laravel 8 or lower, please install version 1.
Usage
Instead of using HasTranslations on your model use:
<?php namespace App\Models; use Creativeorange\LaravelTranslatableAndInjectable\Traits\HasTranslationsTrait; class Question extends Model { use HasTranslationsTrait; // use Spatie\Translatable\HasTranslations; remove this one }
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.