PHPackages                             jesperfiltenborg/nova-variable-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. jesperfiltenborg/nova-variable-field

ActiveLibrary[Templating &amp; Views](/categories/templating)

jesperfiltenborg/nova-variable-field
====================================

A Laravel Nova field has the opportunity to contain variable values.

0.0.1(3y ago)06MITVuePHP ^8.1

Since Jan 17Pushed 3y agoCompare

[ Source](https://github.com/JesperFiltenborg/nova-variable-field)[ Packagist](https://packagist.org/packages/jesperfiltenborg/nova-variable-field)[ RSS](/packages/jesperfiltenborg-nova-variable-field/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Important
=========

[](#important)

This package will no longer be maintained. Please use  as a replacement. If you do not like the different approach of the spatie package, feel free to fork this repository and release new versions of it.

Nova Translatable Field
=======================

[](#nova-translatable-field)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b82a996c69b92285d351d06f4655aa6ea527333e38916ac31d0812311b4e1328/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d726d6f6e61742f6e6f76612d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mrmonat/nova-translatable)

Adds the ability to show and edit translated fields created with [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable) package.

It will show up in the detail view like this:

[![](https://camo.githubusercontent.com/be3f959a21736e249433ae4c0d3317bcc539a4f69cf97a06f3ddf48d9f3e895b/68747470733a2f2f6d726d6f6e61742e64652f6769746875622f696d616765732f6e6f76612d7370617469652d7472616e736c617461626c652d64657461696c732e706e67)](https://camo.githubusercontent.com/be3f959a21736e249433ae4c0d3317bcc539a4f69cf97a06f3ddf48d9f3e895b/68747470733a2f2f6d726d6f6e61742e64652f6769746875622f696d616765732f6e6f76612d7370617469652d7472616e736c617461626c652d64657461696c732e706e67)

And in the edit view like this:

[![](https://camo.githubusercontent.com/4c76c89e71e2de0b8922d8d075f711204d6595815fa8baaba9ecc1cab111b588/68747470733a2f2f6d726d6f6e61742e64652f6769746875622f696d616765732f6e6f76612d7370617469652d7472616e736c617461626c652d656469742e706e67)](https://camo.githubusercontent.com/4c76c89e71e2de0b8922d8d075f711204d6595815fa8baaba9ecc1cab111b588/68747470733a2f2f6d726d6f6e61742e64652f6769746875622f696d616765732f6e6f76612d7370617469652d7472616e736c617461626c652d656469742e706e67)

Alternative with support for more field types
---------------------------------------------

[](#alternative-with-support-for-more-field-types)

If you need support for more field types to be translated, take a look at the official package from spatie:

Installation and usage
----------------------

[](#installation-and-usage)

You can require this package using composer:

```
composer require mrmonat/nova-translatable

```

You can add the field follows:

```
use MrMonat\Translatable\Translatable;

Translatable::make('Description'),

```

Make sure, that you have your Eloquent model setup correct:

- First, you need to add the `Spatie\Translatable\HasTranslations`-trait.
- Next, you should create a public property `$translatable` which 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 `text`-datatype in your database. If your database supports `json`-columns, use that.

Here's an example of a prepared model:

```
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;

class NewsItem extends Model
{
    use HasTranslations;

    public $translatable = ['name'];
}
```

### Defining Locales

[](#defining-locales)

Locales can be defined via config file `config/translatable.php` (config file can be created via [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable#installation) package) by adding a `locales` array:

```
// config/translatable.php
return [
    ...
    'locales' => [
        'en' => 'English',
        'de' => 'German',
        'fr' => 'French',
    ],
];

```

Alternatively you can "override" the config locales with the `locales(...)` method:

```
Translatable::make('Description')->locales([
    'en' => 'English',
    'de' => 'German',
]),

```

### Single Line Option

[](#single-line-option)

By default the input field on the edit view is a textarea. If you want to change it to a single line input field you can add the `singleLine()` option:

```
Translatable::make('Description')->locales([...])->singleLine(),

```

### Trix Editor

[](#trix-editor)

You can use the trix editor for your translated fields by using the `trix()` option:

```
Translatable::make('Description')->trix(),

```

### Index View

[](#index-view)

By default the locale used when displaying the field on the index view is determined by `app()->getLocale()`. To override this you can use the `indexLocale($locale)` option:

```
Translatable::make('Description')->indexLocale('de'),

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1209d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cff86cfa5f180cab39b25c2d62bc13fd9b43e10e1a7bb9f0321047d2745ff34?d=identicon)[Jesper Filtenborg](/maintainers/Jesper%20Filtenborg)

---

Top Contributors

[![mrmonat](https://avatars.githubusercontent.com/u/17597850?v=4)](https://github.com/mrmonat "mrmonat (40 commits)")[![andypa](https://avatars.githubusercontent.com/u/148700?v=4)](https://github.com/andypa "andypa (2 commits)")[![JesperFiltenborg](https://avatars.githubusercontent.com/u/69187219?v=4)](https://github.com/JesperFiltenborg "JesperFiltenborg (2 commits)")[![ldudzsim](https://avatars.githubusercontent.com/u/26061479?v=4)](https://github.com/ldudzsim "ldudzsim (2 commits)")[![RonMelkhior](https://avatars.githubusercontent.com/u/1017721?v=4)](https://github.com/RonMelkhior "RonMelkhior (2 commits)")[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (1 commits)")[![benjamincrozat](https://avatars.githubusercontent.com/u/3613731?v=4)](https://github.com/benjamincrozat "benjamincrozat (1 commits)")[![d8vjork](https://avatars.githubusercontent.com/u/2331052?v=4)](https://github.com/d8vjork "d8vjork (1 commits)")[![vmitchell85](https://avatars.githubusercontent.com/u/1248035?v=4)](https://github.com/vmitchell85 "vmitchell85 (1 commits)")[![jimmitjoo](https://avatars.githubusercontent.com/u/5941943?v=4)](https://github.com/jimmitjoo "jimmitjoo (1 commits)")

---

Tags

laraveltranslatablenova

### Embed Badge

![Health badge](/badges/jesperfiltenborg-nova-variable-field/health.svg)

```
[![Health](https://phpackages.com/badges/jesperfiltenborg-nova-variable-field/health.svg)](https://phpackages.com/packages/jesperfiltenborg-nova-variable-field)
```

###  Alternatives

[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[outl1ne/nova-multiselect-field

A multiple select field for Laravel Nova.

3402.9M2](/packages/outl1ne-nova-multiselect-field)[outl1ne/nova-translatable

A laravel-translatable extension for Laravel Nova.

203416.9k8](/packages/outl1ne-nova-translatable)[emilianotisato/nova-tinymce

This Nova package allow you to use TinyMCE editor for text areas.You can customize the editor options and... you can upload images to your server and put them rigth there on the text without leaving the text editor!

116884.3k4](/packages/emilianotisato-nova-tinymce)[silvanite/novafieldcheckboxes

A Laravel Nova field to display a number of multi-select options using checkboxes.

70846.9k1](/packages/silvanite-novafieldcheckboxes)[waynestate/nova-ckeditor4-field

This nova package allows you to use CKEditor 4 for text areas.

62739.1k8](/packages/waynestate-nova-ckeditor4-field)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
