PHP code example of lucasgiovanny / filament-inline-translate-field
1. Go to this page and download the library: Download lucasgiovanny/filament-inline-translate-field 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/ */
lucasgiovanny / filament-inline-translate-field example snippets
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;
class Activity extends Model
{
use HasTranslations;
public $translatable = ['name'];
}
return [
'available_locales' => [
'en' => 'English',
'fr' => 'French',
'es' => 'Spanish',
],
];
use LucasGiovanny\FilamentInlineTranslateField\Forms\Components\Fields\InlineTranslateField;
return $form
->schema([
InlineTranslateField::make('name'),
]);