PHP code example of rslanzi / nova-translatable

1. Go to this page and download the library: Download rslanzi/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/ */

    

rslanzi / nova-translatable example snippets


NovaTranslatable::make('Title')
    ->singleLine()

NovaTranslatable::make('Text')
    ->hideFromIndex()

NovaTranslatable::make('Title')
    ->singleLine()
    ->counted()

NovaTranslatable::make('Title')
    ->singleLine()
    ->counted()
    ->maxChars(60)
    ->warningAt(50),

NovaTranslatable::make('Title')
    ->singleLine()
    ->counted()
    ->maxChars(60)
    ->warningAt(50),

NovaTranslatable::make('Text')
    ->ckeditor()

NovaTranslatable::make('Text')
    ->trix()

NovaTranslatable::make('Title')
    ->sluggable('Slug'),
NovaTranslatableSlug::make('Slug')
    ->hideFromIndex(),

NovaTranslatable::make('Text')
    ->code()

NovaTranslatable::make('Text')
    ->code()
    ->language('php')

NovaTranslatable::make('Text')
    ->json()