1. Go to this page and download the library: Download nalingia/laravel-i18n 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/ */
nalingia / laravel-i18n example snippets
use \Nalingia\I18n\Traits\HasI18n;
class Article extends Model {
use HasI18n;
public $catalogueAttributes = [
'title',
'abstract',
'content',
];
}
$article->title
public function getCatalogueItem(string $attribute, string $locale) : string