PHP code example of anekdotes / polyglot

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

    

anekdotes / polyglot example snippets


class Test extends TranslatedModel

protected $polyglot = ['locale', 'title', 'description', 'slug'];

protected $fillable = ['rank', 'locale', 'title', 'description', 'slug'];

class TestLang extends Model

protected $fillable = ['locale', 'title', 'description', 'slug'];

public $timestamps = false;