PHP code example of s-shiryaev / laravel-translatable
1. Go to this page and download the library: Download s-shiryaev/laravel-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/ */
s-shiryaev / laravel-translatable example snippets
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use SShiryaev\LaravelTranslatable\Translatable;
class Currency extends Model
{
use Translatable;
protected $translatable = ['name', 'code'];
protected $fillable = [
'id',
'name_ru',
'name_en',
'code_ru',
'code_en',
'code_de',
'active',
'sort',
];
}