creativeorange/laravel-translatable-and-injectable

v2.0.0 2022-05-04 11:13 UTC

This package is auto-updated.

Last update: 2024-03-04 15:14:14 UTC


README

Total Downloads Latest Stable Version License

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.