creativeorange/laravel-translatable-and-injectable

v3.0.1 2024-08-19 09:14 UTC

This package is auto-updated.

Last update: 2024-12-19 10:05:33 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.