You can install the package via composer:
composer require spatie/laravel-translatable
##Making a model translatable
The required steps to make a model translatable are:
- First, you need to add the Spatie\Translatable\HasTranslations-trait.
- Next, you should create a public property $translatablewhich holds an array with all the names of attributes you wish to make translatable.
- Finally, you should make sure that all translatable attributes are set to the json-datatype in your database. If your database doesn't supportjson-columns, usetext.
Here's an example of a prepared model:
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;
class NewsItem extends Model
{
    use HasTranslations;
    public array $translatable = ['name'];
}