PHP code example of juniora / nova-translatable

1. Go to this page and download the library: Download juniora/nova-translatable library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

juniora / nova-translatable example snippets


// Any Nova field
Text::make('Name')
  ->rules('ield
Multiselect::make('Football teams')
  ->rules('n')
  ->translatable([
    'en' => 'English',
    'et' => 'Estonian',
  ]),

use Outl1ne\NovaTranslatable\HandlesTranslatable;

class Product extends Resource
{
    use HandlesTranslatable;

    public function fields(Request $request)
    {
        return [
            Text::make(__('Name'), 'name')
                ->sortable()
                ->translatable()
                ->rules(['max:255'])
                ->rulesFor('en', [
                    '
bash
php artisan vendor:publish --tag="nova-translatable-config"